5 ms·
ioquatix, just I'm clear, if this is an evented server it will use just one core? Or does it create one process per core? If not do you recommend we use https:/
by sudhirj 8y ago
ioquatix, just I'm clear, if this is an evented server it will use just one core? Or does it create one process per core? If not do you recommend we use https://github.com/stripe/einhorn https://github.com/stripe/einhorn to split the work across N falcon processes (one for each core)?
And do you have advice / recommendations on database pool sizes when using Rails? I assume that each process will have access to as many connections as specified in the DB_POOL config? Does falcon need any pre/post fork re-creation of all connections?
- sudhirj 8y agoSomeone more knowledgeable about Rails can pitch in, but I believe in the absence of any connection management code, Rails will check out one connection per request the first time it is used? And checkin after the request terminates? If that is the case, wouldn't the number of simultaneous requests effectively be capped at the database pool size for DB heavy applications?
- ioquatix 8y agoI don't know that but it would make sense.
- ioquatix 8y agoThis is controllable, but by default it makes one process per core. Regarding the pool size, I'd suggest that it should correspond more to how many simultaneous connections you think you'd have per process, so maybe just choose something like 32 to start with? Benchmarks would be required to find the sweet spot. To achieve true scalability you should use something like https://github.com/socketry/async-postgres https://github.com/socketry/async-postgres (/mysql) but this is a work in progress.
- ioquatix 8y agoFeel free to come and discuss your requirements in https://gitter.im/socketry/falcon https://gitter.im/socketry/falcon