I've doubt regarding speed and latency for show real time data.
Let's assume that I want to show read time data to users by fire ajax requests at every second that get data from MySql table by simple collection query.
For that currently these two options are bubbling in my mind
- MySql / Amazon Aurora
- File system
Among these options which would be better? Or any other solution?
As I checked practically, if we open one page in browser then ajax requests gives response in less than
PHP, MySql, Nginx stack.
But if we open more pages then same ajax requests gives response in more than
1 second that should be less than
500ms for every visitors.
So in this case if visitors increase then ajax requests gives very poor response.
I also checked with
Node.js+MySql but same result.
Is it good to create
json files for records and fetch data from file? Or any other solution?