sharif_42
sharif_42

Reputation: 571

how does django ORM handle thousands of concurrent requests as it is synchronous?

As Django ORM is a synchronous piece of code and django is WSGI based, then how it serve thousands of concurrent request at a time.

Upvotes: 0

Views: 587

Answers (1)

Mohammed Aadil
Mohammed Aadil

Reputation: 153

Django is synchronous but we do not define ORM concurrent request based on that. It is database that need to handle concurrent requests.

If you use connection pooling or use multiple connection to database of some sort then we say concurrent requests handling. There comes commits to table. Every changes in db we say transactions, and in every transaction there can be multiple commits. Commits are synchronous to keep db integrity.

To understand database working with schema please read this Post

Upvotes: 4

Related Questions