Java in the Auto-Scaling Cloud

Amazon Web Services provides a way to auto-scale your resources as demand and volume increases or decreases.  You define the conditions through Amazon CloudWatch to schedule scaling and you can receive notifications  via Amazon Simple Notification Service.  You can also replace unhealthy instances automatically. AWS offers a range of application and database offerings.    Microsoft’s Azure Cloud has also recently offered auto-scaling to the Azure Cloud.  Azure offers application-and database-centric offerings (SQL Server, BizTalk Server, vanilla Widows and Linux VMs).
JavaCloud7There are a number of other noteworthy cloud offerings including Joyent which offers some unique features that make them highly interesting from a high-multi-tenancy angle.Let’s look at one of Amazon’s offering – Elastic Beanstalk.  You can get a good idea of what transpires when you read the Dr. Dobb’s walkthrough :
And another excellent, step-by-step on auto-scaling :
One, unique and interesting class of cloud products that have emerged from the Java-space focuses around auto-scaling and rapid configuration and installation.
One such cloud offering, Jelastic, offers a cloud where you can choose your software stack and set the limits of auto-scaling.  If you are not familiar with auto-scaling – it allows you to run and (automatically) scale your Java or PHP application depending on load volumes – with no code changes.  This offering is tailored to Java and PHP.  Jelastic offers a web hosting cloud features that automatically installs and interconnects your server instances with your software.  The software stack choices offer Java-based servlet and application engines (Tomcat, GlassFish and Jetty) or PHP app servers (Apache, NGINX) and SQL database servers (MariaDB, PostgreSL, MySQL) or NoSQL databases (MongoDB, CouchDB) as welll as memcached.  You simply upload your application packages and choose your environment. It also offers version roll-back to a previously installed package should you have discover coding errors.   Jelastic allows automatic vertical scaling which increases (RAM and CPU) provided to a web server as application load grows. As well as reducing resources as the load goes down.  Jelastic also provides auto-scaling of application servers and balancing them across compute nodes.  It supports a number of features and JVM-based languages such as Clojure, ColdFusion, JRuby, Groovy and Scala as well as Java itself.  It also supports PHP (5.3 and 5.4).

Another, Java-oriented cloud offering is CloudBees.  It offers an approach to develop and build Java applications within the CloudBees cloud and if you choose to, you can deploy them to other clouds as well.

It get’s more interesting, companies like Heroku, offer a way to focus on coding features and not focusing on infrastructure aspects while at the same time being able to use existing cloud services.  These solutions can sit on top of a cloud, like AWS. What Heroku provides is a suite of add-ons that would normally concern the development team – but Heroku removes those concerns by simply and transparently doing a lot of the work for those teams.  It allows rapidly putting new features into production.  Heroku offers it’s own dyno (lightweight container) scaling with add-ons like Adept Scale.  All of this sounds pretty ideal, but recently the complexity part of all of this caught up with reality.  The company, Rap Genius, encountered issues with the way Heroku distributed requests.  Though this has less to do with auto-scaling – it is interesting and pertinent never-the-less. Rap Genius offers a cautionary tale on the complexity of modern web and cloud environments. There is an interesting response to this in an interview with the Heroku’s general manager.Java applications servers have been changing to accommodate the elasticity of  PaaS environments.  GlassFish is a good example of one such Java EE application server which is incorporating PaaS features in it. There is an excellent talk from JavaOne 2011, Clusters in the Cloud : Dynamically Scaling Application Server Clusters with the Cloud which you can view :
At JavaOne 2011, Arun Gupta provided a wonderful exposition of GlassFish PaaS services. You can view the aspects of the lab and view the talk here :
In a nice late 2012 blog, there is a nice write-up where  you can discover more about GlassFish in a PaaS environment.
We can see that All of these solutions, are interesting if you care about scalability and rapid time to develop and deploy.

clojureiconGo to more posts on clojure or that are clojure-related at

Recommended Reading : Performance Characteristics of Java-Based NoSQL Database on SSDs

If you are interested in performance characteristics on solid state drives (SSDs), the impact of software (in this case Java)  you will be interested in both the performance of a Java-based NoSQL databases (in this case an open source implementation of Amazon Dynamo).  LinkedIn did a series of benchmarks and optimizations that showed the issues around fragmentation, garbage collection and latency.  This article shows the performance characteristics and how LinkedIn solved some of the issues by avoiding object caching during the Voldemort’s cleanup and reducing stress on CMS garbage collection.



gotostorageGo to more posts on storage and flash storage at


Recommended : Clojure and Java VM-Based Languages

This excellent presentation (mid-2011) covers the Clojure programming language.  I’m spending some time looking at this language. It resonates with my past – where I spent a fair amount of time on LISP and LISP machines.


Clojure is a functional programming language (in this case, LISP-oriented) that sits on top of the Java Virtual Machine (JVM). This is one of many languages – functional, dynamic and object-oriented – that sits on top of the Java VM.  All of these languages can leverage the underlying Java classes. For example, JRuby, is a dynamic language that can be found on the JVM.  Groovy is another dynamic language that sits on the JVM.  Scala, yet another language that sits on top of the JVM.   JavaScript, BeanShell, Jython and many more languages also sit on top of the JVM. Another recommended reading item is a comprehensive look at JVM-based languages.  If you are interested in the Java VM as a platform for other languages – this is an excellent read :


clojureiconGo to more posts on clojure or that are clojure-related at

Recommended Reading : Best Practices for Virtualizing and Managing SQL Server 2012

Microsoft has released a new whitepaper that should be of interest to those that virtualize SQL Server using Microsoft’s virtualization technologies.  This guide provides high level best practices and considerations for deploying and managing Microsoft SQL Server 2012 on Microsoft virtualization infrastructure.


If you missed it there is a nice best practices technical paper (you need to sign up to download it) on how to accelerate Microsoft SQL Server on an all-flash Violin Memory array.  You can see the accelerated performance of running on SQL Server on Violin here.

Recommended Listening : Technical Talk on Twitter’s Architecture

This is a very interesting talk on what makes Twitter run. Raffi Krikorian, Senior Director of the Applications Services Group at Twitter, explains the architecture used by Twitter to deal with thousands of events per second.  The Applications Services Group acts as the custodians of Twitter’s core logic and application infrastructure. They manage the business logic, scalable delivery, API’s and authentication of Twitter’s application.