What is the best way to save data in real time?

Asked

Viewed 58 times

0

Guys, can you tell me how to best save data in real time? For example, I have a news portal and need to save every access I receive and show on a private panel, but in case my site has 30,000 simultaneous people running a script that saves visits. Currently using mysql and php being requested by an ajax script.

Thank you.

  • I recommend using Azure Functions and AXIOS, you can create a backend that receives this, and send using AXIOS. Veja https://github.com/axios/axios e https://azure.microsoft.com/pt-br/services/functions/

  • Have you tried searching firebase?

  • 1

    Have you thought about the /var/logs/apache2/access.log?

  • +1 in the @Magichat comment for not wanting to reinvent the wheel =). The logging of each access, with timestamp, ip and user agent is already saved in the log of accesses of your web server, just minerar these data to display in the panel. You can build a PHP script that consumes this file into mysql from the last timestamp processed and schedule it in cron to run once per minute, for example.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.