#18135: Sleeping Database Connections on Startup with MySQL
-------------------------------------+-------------------------------------
     Reporter:  Mnewman              |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Design
     Keywords:  MySQL                |  decision needed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mnewman):

 This is not scalable. It makes sense for small applications to have a
 database query open for every thread that you have running the Django app,
 but what happens as your application scales? You can leverage agressive
 caching techniques or NoSQL to make the load on the databases less and
 less. Some applications that I run only need connection to the database
 when a write operation is performed.

 So what happens on sites, like I have, that run millions of concurrents? I
 need hundreds of thousands threads to properly scale. I cannot afford a
 relational database that requires that many open "sleeping" connections.

 Persistant connections are a fine thing for small sites that don't
 autoscale along with swaths of users that are looking to improve
 performance by the couple of hundredths of second that it takes to connect
 to a local database, but when it comes to a large site, the overhead of a
 connection on each Django instance is really detrimental.

 This needs to at least be an option. The difference in price between a
 database that has 50 available connections to one that requires 500 is
 extreme. Applications can cache queries to the database, they can't
 magically increase the number of available connections to the database.

 I will weigh in on the discussion on django-dev, can you point me in the
 right direction? I have not seen it pass through my inbox.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18135#comment:26>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to