A
A
Alexander Maslov2014-07-31 08:57:42
MySQL
Alexander Maslov, 2014-07-31 08:57:42

How to implement a minimum load on mysql, with a large visit to the application?

Good day to all!
Comrades, the following question is of interest: what is better to use, or how best to organize multi-user actions for one application.
I will describe the situation: there is a module containing the entrance to several locations. Upon entering, the user is identified in the database that he is currently in one of several locations. As you move through the locations, the record changes accordingly. In each location, you can attack those who are currently in the same place. The database contains a table that duplicates the user's parameters, especially for the module, if the specified cell is 0 after the attack, the record is deleted, and the user accordingly goes to the beginning of the location.
Question: with this approach, it is clear that if there are 50-100 users in the module, the database will tolerate it, but if there are 1000+ of them, then, accordingly, there is a huge load on mysql with a large number of queries. Are there any ideas for getting out? Isn't it more cost effective to use sqllite? Or better?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Snewer, 2014-07-31
@Snewer

Try Redis

V
Vitaly Zheltyakov, 2014-07-31
@VitaZheltyakov

Will these 1000+ users of yours be making requests at the same time?
It is not clear what queries you go to the database (?)
It is not clear what calculations are performed on the data (?)
Describe in more detail.
Perhaps you can simply transfer part of the load from the database to files. For example, the same user data that is duplicated.

A
Alexander Kubintsev, 2014-07-31
@akubintsev

Why write this data to disk storage all the time?

I
Igor Vorotnev, 2014-07-31
@HeadOnFire

For such scenarios, there is in-memory caching. Look towards Redis or Memcached.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question