Building a scalable platform for more than 100,000 requests a second
It’s hard to count on popularity. WebRep, the avast! browser plugin that gives users a reputation rating for visited websites, faced scalability issues soon after its launch in early 2011. The number of users shot past the original expectations and the incoming opinions were overwhelming the system.
We started WebRep with the ability to process 10,000 user responses a second, but the system was getting overwhelmed as the number of responses jumped to the 100,000 level.
If you aren’t familiar with it, WebRep was developed by AVAST Software to provide reputation ratings for internet domains. The browser plugins visually indicate the trustworthiness of the visited page with a “traffic-light” format of green, orange, and red. This information is processed from data submitted by the avast! community with individual users enabled to express their subjective ratings for each visited page through the plugin's user interface.
The WebRep backend is written in Java and is a prime example of the challenges a programmer faces when developing a scalable application which should serve millions of clients. Lukas Hasik, our QA man, together with Pavel Kucera and Zbynek Slajchrt, are presenting AVAST Software’s experience in scaling WebRep in their presentation “Designing Heavily Loaded REST Applications in Java Time” today, October 3, 2011 at this week’s JavaOne conference in San Francisco and they wrote this post about it:
To work properly, WebRep has to let people express themselves quickly, but our growth has been a series of spikes. This means we’ve had to make a lot of small, steady steps. And if something didn’t work, we would tweak it again.
For this purpose, a Java solution is outstanding due to its maintainability stemming from the number of production-ready frameworks, libraries such as Netty, as well as enhanced manageability through the JMX protocol.
Except the small prototype written in C, Java was the obvious way to go for writing this application. But since the crucial point is the use of the non-blocking or asynchronous I/O calls along with intensive caching, we guess that similar result could be achieved in other languages as long as they can somehow access epoll, kqueue or the equivalent.
With avast adding tens of millions of users each year, Java is crucial for the future growth of WebRep. We can now handle the current load very well and to scale. As needed, we will simply add another node into the cluster - this is an indication of a well-designed architecture.
And for you WebRep users, all these technical changes mean that your opinions count.
Here is more information about t WebRep, just click here.