Will too many connects affect system performance?
A PostgreSQL server instance may need to process a large number of connection requests at the same time, such as the following:
- Some business applications lack of connection pooling capabilities, they can not maintain too many idle connections for a long time. Finally, these applications adopt a short connection model, in which a connection makes only a small number of queries;
- There are many modules/microservices in business applications, each part of the business maintains its own connection pool, thousands of connections are established between the application side and the database server, and the database server also needs to handle a large number of connection requests and disconnections;
In these cases, can the database server instance remain running efficiently?
Redrock Postgres supports the multithreaded Postgres model, which enables Postgres processes on UNIX and Linux to run as operating system threads in a separate address space, creating and destroying operating system threads is very efficient, and the database server can handle a large number of connection requests at the same time.
On Windows, session related backend processes always run as threads, and the background processes run as operating system processes. On Linux, the multi-process Postgres model is used by default, and you need to modify the configuration parameter threaded_execution
to enable the multi-threaded Postgres model.