0

I can't find the answer anywhere and I've looked all over the internet.

I am about to launch an application (mobile game) that connects to a web-server. I am expecting about 1,000 concurrent users to be on the game at peak hours. EVERY request to the game requires a database request to either get or add new data.

I am currently using a t2.small database from AWS RDS. Apparently the max_connections for this type of database is 150. My questions are:

1) Does this mean there can only be a maximum of 150 concurrent users accessing my application/game? This seems like an EXTREMELY low number for a $30/month database server.

2) How long does each database connection last? If I have 500 people putting in a database request and the limit is 150 connections then it wouldn't be so bad if each connection is only open for say 250ms. If each connection is open for 1 second then people waiting approximately 3 seconds per request is too long.

3) Do I need to reserve a database connection for the admin to be able to login every time?

Any help would be great, thank you.

FromThe6ix
  • 13
  • 3
  • 7

1 Answers1

0

I think something have gone terribly wrong.

Users shouldn't access MySQL server directly, and you needn't create a new MySQL connection for every individual user. What you should do is to setup a server to handle all requests from users. The MySQL connections only exist between Server and MySQL server, it could be one or several depending on your architecture.

The framework just looks like this:
enter image description here

And this is the simplest one usually.

So, in this case, the limit of 150 connections is just more than enough. Actually 150 connections is adequate for most applications.

walter
  • 1,199
  • 7
  • 13
  • I am using a linux server that connects to the database server. Does that make sense? I don't need to worry about anything? – FromThe6ix Mar 19 '18 at 12:20