resource consumption management in glassfish

One of the nice things I like in my job at Sun is that I get to meet really demanding customers at our Executive Briefing Center. We get to talk with some really good technical guys, who are thinking ahead and seeing around the curve. Last year we were talking to a couple of guys in a major financial company on the east coast. They had heard about Solaris Containers aka Zones and were wondering how it could ease management of the dozens of J2EE applications they now have to manage.

Zones give a fairly lower virtualization of system resources. Each zone has a distinct IP address and hostname and root file systems. You can automate and recreate a similar looking zone on a different machine. One could put a J2EE application server and one business application in each zone and you could do very well isolating and managing resources consumed by each of the apps. In fact we found that this was exactly the model followed at another major financial house that is moving to Solaris 10.

But Zones are only on Solaris 10 and upwards. What about Linux and Windows? What if the applications were numbering in dozens or hundreds and had a fairly limited usage? Would it not be nice if you could deploy them all as you would normally do, one one Application Server, but still be assure Quality of Service? Things I heard mentioned were:

  • Be able to reserve a specific percentage of request processing capability for a particular business service. OS level resource management capabilities are usually too low level.
  • be able to specify ceilings on resource utilization so that heavier than expected traffic to one application, does not adversely affect other co-redident applications.
  • Then it got a bot more esoteric. Be able to give priority access to one application user over another, when accessing some manager resource, say a database connection pool. Web Identity based resource allocation policies are all but impossible at OS level.
  • So we got thinking and did some thing pretty interesting in project Glassfish. We found out that by placing a policy engine that examines incoming service requests and assigning them to worker threads based on the policy file, gave us a coarse but fairly accurate control on overall resource consumption. We could restrict no more than say 20 users to a particular web application, at any time. We could set aside some request processing threads, so that users of an important time-sensitive application always received good service, even if there was an over abundance of users for some other co-resident applications. Pretty neat. Jeanfrancois implemented this logic on top of Grizzly, the high performance all Java HTTP engine we have under Glassfish Application Server (Happy to to say that it beats some of the best C++ based HTTP engines out there for latency and throughput!). Me and jeanfrancois have a BOF coming up at the upcoming JavaOne on this topic. Jeanfrancois will be blogging about this soon, so you can look at the code and give us feedback. This is an experimental feature right now. We want to get community feedback and contribution before roling it in as a supported feature.

    If you havent already looked at Glassfish, go take a look at http://glassfish.dev.java.net. The code is already checked in.

    Comments:

    You guys should look at the upcoming Solaris Internals book(s) by McDougal et. all and write a similar book for Glassfish, "Glassfish Internals". Or just start posting a ton of articles on Glassfish internals for free. :)

    I'm in the process of getting PHP to work via Glassfish (+apache :/ ). I swear if Glassfish had PHP support in it I could dump Apache altogether and run Glassfish as my main appserver/webserver.
    -M

    Posted by Moazam Raja on April 06, 2006 at 06:09 AM PDT #

    Moazam, There will be a follow on article/blog on how we did resource management prototype in glassfish. Watch out for Jeanfrancois post that should be coming soon.

    I agree with you that we need a series of articles on how to get new open source community members, started with glassfish development. We do have a bunch of how to blogs and articles already. I will try to post some essential reading so folks can find it easily in one place.

    The book will come later :-)

    Posted by Sreeram on April 06, 2006 at 08:50 AM PDT #

    Post a Comment:
    Comments are closed for this entry.
    About

    Various things I do at Sun Microsystems.

    Search

    Categories
    Archives
    « April 2014
    SunMonTueWedThuFriSat
      
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
       
           
    Today