Search code examples
deploymentejb-3.0glassfish-3production-environment

Glassfish 3 EJB app deployment advice?


For a variety of unfortunate management reasons (budget constraints etc.) I, the developer, have been put in the position to deploy the app in a production environment. The catch is that I don't have any experience in production EJB application server deployment. That said, they are aware that there are no guarantees of success.

The context:

  • The dev server runs on the latest version of Netbeans with Glassfish v3, on a mac machine
  • 98% / 99% uptime is ok, there are no financial/critical transactions
  • It is a client/server EJB 3 app, and the web tier, business tier, and resource tiers currently run on the same machine.
  • I have the liberty to choose the hw/sw infrastructure
  • Load estimations: 10 simultaneous connexions avg, rare 200 peaks
  • The outbound public data is text/small pics (it's for iPhone clients), inbound HTTP text only
  • Basic maintenance will be taken care of (backup, server reboot, etc)

My questions for production deployment:

  • What are the must haves infrastructure-wise? Minimum system specs etc?
  • Is it ok to keep Glassfish v3?
  • Which configuration aspects of the server should I focus on?
  • Worst case scenario: if I deploy the same software infrastructure (Netbeans/Glassfish v3) as during the development, would the server keep up?

Any piece of advice would be most welcome. Thanks!


Solution

  • For the architecture, you can start small with just a single GlassFish instance with no front web server (GlassFish has one built in that is very capable). If you can wait for the release of GlassFish 3.1 you'll be able to add instances (clustered or standalone) and offer scalability and centralized admin.

    Most production instances of GlassFish I've seen run with 1GB-2GB of JVM heap (-Xmx) but your mileage may vary if you load lots of data in memory or if you use some frameworks. If you want better reliability, having them on separate machines is a plus obviously. With two instances on the same machine you can offer continuity of service if one instance fails (but not if the machine fails).

    I'd suggest scripting as much as possible the provisioning of the resources (connection pool , JDBC datasource, etc...) and applications using the "asadmin" command-line tool and try to not use NetBeans on the production platform.

    Benchmarking with simulated load sounds like a wise thing to try to put together before going live and this survival guide will probably come in handy.

    You don't mention the database. Isn't there one?