More cache less cashPosted by Max Robbins on October 12th, 2010
Applications have a hard time scaling. Its not their fault they where generally designed to do very complicated things in an easy fashion. They just did not think the internet would allow hundreds and thousands of people to do them all at once.
You might ask why after all these years is scaling still such an issue. The answer primarily lies with application servers. While web server grew up in the internet environment the ability for a web-server to serve huge numbers of requests simultaneously is pretty well understood stuff. You queue up a particular pattern and simply repeat it ad nauseum. Where the issue comes in is when not every request is the same. In this scenario each time a request is made the thinking part of the site the application server has to formulate the question, pass it to the database and then parse the results.
If I keep asking the same set of questions the application server treats each instance as a new question. They are simply not smart enough to realize that that questions has been asked before I don’t need to go through the steps again.
Enter the world of caching. Smart caching like Aicache are masters of pattern recognition. They can intelligently listen to each request and set it aside the answer. If another request comes in for the same thing then they can pass the answer right out of memory. This is generally thousands of times faster than looking up the data again. The value of intelligent caching is that it recognizes the the most recent queries are likely to be repeated.
Think of it like snow on a school morning. Every kid wants to know if school is going to be closed for the day. The smart caching server gets the answer and can server it 40 to 50 thousands times a second while the application server takes a nap. You can tune the cache to ask the question again every 15 minutes or hour or day. So where before you had an application server that can maybe answer the question 5 times a second, suddenly with caching it can answer it 10,000 times as often and as quickly.
So to get the same results from your standard internet installation would would need literally hundreds of application servers all working in tandem. Servers that cost money, requires hosting fees, and need attention from expensive experts. Or you can install one caching server.
Generally you build your server environment to handle peak periods. This means that you have to overbuild your environment for what amounts to a few hours a day or a few days a month. You waste all the money for the times when you have low traffic. Caching solves this issue by allowing you to have the high connection numbers and high throughput without the additional hardware.
So in short the installation of a single caching server can reduce the overhead of a typical web application by a factor of ten. Wouldn’t you sleep better at night knowing your site can handle any amount of traffic and on days when you don’t need it you don’t pay for it.
So more cache, less cash.