Skip to content

Comment on Scaling node.js to 100k concurrent connections

Comments

I wonder what happens at 100k database connections , i will give a try with firebird and the nodejs driver

That's the thing about these types of benchmarks. They're useful for showing that node has the throughput -- at a low level -- to serve a huge number of concurrent connections, but it doesn't translate directly to huge application throughput if you're relying on things like database access over a network. In practice, each of these problems must be solved individually.

I don't mean to minimize this accomplishment. If you're assuming you need 100k database connections in order to scale, you might be solving the wrong problem. Scaling is a matter of moving data as close to the CPU as possible. This means in-memory caching is where real performance comes in. I don't care how good your language/framework is, you can't defeat the physics of slow I/O over a network.

You would be using a connection pool instead of opening one for every client.

I have 500-600 node connections using a single DB connection and it works fine. It's MySQL using binary driver though.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.