简体   繁体   中英

How Many Database Connections Will ActionCable Open?

I've been trying out ActionCable and was wondering how many database connections it will attempt to open. Will it be one per instance or one per consumer connection? Having 100k consumers with a database connection opened for each would crush the database.

It depends on the worker pool. If you worker pool is set to 100 then 100 database connections it can open. ActionCable::ServerWorker::ActiveRecordConnectionManagement takes care to ensure connections are checked back into the pool.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM