E
E
ericcartman2018-10-03 18:21:22
Java
ericcartman, 2018-10-03 18:21:22

Connection pool, for what purpose? What's so heavy about recreating?

It is known that:

Connection pools are used to reuse an existing connection for new tasks, because destroying and then recreating is an expensive and heavy operation.

Question: what is the most heavyweight when creating connections, why did you go to create pools?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2018-10-03
@ericcartman

  1. Creating a tcp connection is slow;
    If a connection is created 500 times per second, one simple request is executed through it, and the connection is closed, then the DBMS and the client spend part of the bandwidth on meaningless actions. It is much more reasonable to open a connection once, run two million requests through it, and only therefore can it be closed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question