3 ms·
Large scale environments where real performance matters. I wrote a system the has to handle 4 Billion transactions a day and a peak of 45,000 per second. And
by kator 14y ago
Large scale environments where real performance matters.
I wrote a system the has to handle 4 Billion transactions a day and a peak of 45,000 per second. And has to respond in 10ms or else the results of the transaction are discarded.
I wrote it in PHP so it would be easier for my team to maintain but it would not scale beyond 4,500qps then I re-wrote it in C as an apache module and it now scales to 25,000qps per server.
Sometimes you just have to write stuff in C. I've been writing in C for 28 years. I write other languages as often as I can but once in a while I have to go back to C to get something done. Right tool for the right job!
- debacle 14y agoDid you investigate writing a PHP extension at all? I'm not sure what the speed difference would be, but most people I know say that the PHP interpreter is too hairy to really work with.
- chc 14y agoIn fairness, there are probably a lot of languages that could have handled that load without too much trouble — C, C++, Java, OCaml, Haskell, maybe Erlang. But C does make high performance fairly easy.