Hacker News new | ask | show | jobs
by ccccccccccccc 2946 days ago
Question: What is the point of making the fastest web server possible when any kind of datastore attached to the server is going to be the bottleneck?
3 comments

That's a good question, and something that's not always obvious without having been in a situation to get advantage from such an improvement.

First, even if waiting for a response from the database is the largest single contributor to your response time, and if you're running an extremely low-traffic service, there's still benefit in reducing your total latency

Second, if you're not running a low-traffic service, and have enough requests that you're approaching the memory or cpu capacity of your web server (or have an existing application that's already deployed across multiple servers), making significant reduction in your CPU or memory use can let you handle quite a bit more traffic with less hardware.

Third, not all web services involve little more than making a request to a single external slow database. The data for your service could be: * Static * Ephemeral, kept in-process * In a database on the same server * In a fast database (memcache) * Require nontrivial processing * Processed by a separate service you're just acting as a proxy for

That's only true for certain workloads and applications.
Many modern databases are very fast and many modern web servers are very slow. I've run into many applications where database performance was not the bottleneck.