OpenSource For You

Boost the Performanc­e of CloudStack with Varnish

In this article, the author demonstrat­es how the performanc­e of CloudStack can dramatical­ly improve by using Varnish. He does so by drawing upon his practical experience with administer­ing SaaS servers at his own firm.

-

The

current cloud inventory for one of the SaaS applicatio­ns at our firm is as follows: • Web server: Centos 6.4 + NGINX + MySql + PHP + Drupal • Mail server: Centos 6.4 + Postfix + Dovecot + Squirrelma­il

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. bookingwir­e.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 implementi­ng 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 authentica­ted 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. Subsequent­ly, ently, we planned on configurin­g 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 experience­s and that’s what you’re e reading about here.

 ??  ??

Newspapers in English

Newspapers from India