Should PostgreSQL connections be pooled in a Python web app, or create a new connection per request?

前端 未结 5 473
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 17:26

I\'m building a web app in Python (using Flask). I do not intend to use SQLAlchemy or similar ORM system, rather I\'m going to use Psycopg2 directly.

Should I open a new

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-04 17:55

    I think connection pooling is the best thing to do if this application is to serve multiple clients and concurrently.

提交回复
热议问题