Question on connections.

36 views
Skip to first unread message

meName

unread,
May 11, 2016, 8:45:05 AM5/11/16
to Google Cloud SQL discuss
Hi,

So as i understand, there is no limit for QPS. But what if my website is dynamic and relies on DB for retrieving and updating information, and say more than 4000 concurrent connections are done at the same time?

My idea of concurrent connections is, say, 10000 users accessing my site at the same time and my site has a script that connects to the DB, so this means that there are 10000 connections at the same time.

Please assist.

Many Thanks.

Vadim Berezniker

unread,
May 11, 2016, 1:50:34 PM5/11/16
to Google Cloud SQL discuss
A common approach is to use connection pooling in the client application. 
It avoids the need to re-establish connections (which can be expensive in terms of latency) and allows you to limit the total amount of connections in use at any time. It works well in practice.

In case it doesn't, then you may need to introduce caching in your application or apply other techniques (for example creating read replicas and spreading load to them or sharding the data amongst multiple database instances). Things get a lot more complicated once you start going down this path so it's best to see if connection pooling will suffice. 

If performance is a concern, I suggest setting up a load test to see how well the application performs.



--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/68c4ea17-6ed0-4243-b23b-894a538f5a20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages