Boost the Performance of CloudStack with Varnish
In this article, the author demonstrates how the performance of CloudStack can dramatically improve by using Varnish. He does so by drawing upon his practical experience with administering SaaS servers at his own firm.
The
current cloud inventory for one of the SaaS applications at our firm is as follows: • Web server: Centos 6.4 + NGINX + MySql + PHP + Drupal • Mail server: Centos 6.4 + Postfix + Dovecot + Squirrelmail
A quick test on Pingdom showed a load time of 3.92 seconds for a page size of 2.9MB with 105 requests.
Tests using Apache Bench ab -c1 -n500 http://www. bookingwire.co.uk/ yielded almost the same figures—a mean response time of 2.52 seconds.
We wanted to improve the page load times by caching the content upstream, scaling the site to handle much greater http workloads, and implementing a failsafe mechanism.
The first step was to handle all incoming http requests from anonymous users that were loading our Web server. Since anonymous users are served content that seldom changes, we wanted to o prevent these requests from reaching the Web b server so that its resources would be e available to handle the requests s from authenticated users. Varnish was our first choice to o handle this.
Our next concern was to find a mechanism to handle the SSL requests mainly nly on the sign-up pages, where we had interfaces ces to Paypal. Our aim was as to include a second Web server that handled a portion of the load, and we wanted to configure Varnish to distribute http traffic using a round-robin mechanism between these hese two servers. Subsequently, ently, we planned on configuring uring Varnish in such a way that even if the Web servers rs were down, the system m would continue to serve pages. es. During the course of this exercise we documented mented our experiences and that’s what you’re e reading about here.