Counting bytes and measuring latencies

Infrastructure elasticity

Three major types of elasticity that  i have implemented / experienced so far are:

  1. Horizontal : by adding or removing service instances in response to certain  amount of load. Like a load balancer , and behind the load balancer there are multiple webserver , the number of webserver are dictated by number of requests / second .. ELB, haproxy,apache mod_proxy , pound , squid etc are examples of load balancers, while nginx, tomcat, jetty, apache, thin, mongrel etc are examples of webservers.
  2. Vertical : by adding or removing cpu/ram in individual server itself. Example, changing instance types of an ec2 instance. Cgroup settings of an lxc ,  or ubc params of openvz containers etc.
  3. Multi environment infrastructure : These server are elastic , as they can belong to different environments at different time. They have the capability of reconfigure themselves against a particular environment. I am trying to improve upon this recently. I am trying to make certain ec2 instance dynamically configurabled aginst many different environments. I have modeled my environment's and service configurations using chef, and 
    • chef-client --once -E unit_testing

will configure a server for unit testing jobs (like git clone, rake spec etc), while 

    • chef-client --once -E functional_testing

will configure xvfb, x11vnc, firefox, cucumber etc, 

Since the functional testings are generally triggered after unit testing (and they also take more time) its ok for me to run them sequentially one after another. But these really enables two different set of essential services as and when needed. Thus reutilizing our infrastructure a bit more. Similar transitions should also be possible across uat, staging, preprod, and the ease of tranisition is actually indicates the delta of intigration points.