Reputation: 14204
One of the interesting things about Twitter is the over capacity, fail whale. My question is, programmatically, how can they detect when their system is over capacity? Is there a special type of exception that gets thrown in this case?
Upvotes: 0
Views: 250
Reputation: 6225
Diskeeper tells you that your system is stressed if you've used over a certain portion of your virtual memory, which I thought was interesting at the time.
Upvotes: 0
Reputation: 19620
Presumably, they've done basic load-testing so they have a solid idea of how much they can process before slowing down unacceptably or even crashing.
Upvotes: 0
Reputation: 180004
There are any number of things that could be used to determine this - it'll depend on the system and what metrics the devs decide to use. A few examples:
Upvotes: 2
Reputation: 190945
I believe its the routers/load balancer's detect this for twitter. If a machine or group of machines have large number of exceptions or return some HTTP 5xx errors, then the load balancers fail over to a "fail whale" server.
Upvotes: 0