Answer the question
In order to leave comments, you need to log in
Competent implementation of the system of dialogues on the site (Architecture)?
There is a website with high traffic (about 120k uniques per day, up to 10k online).
It is necessary to implement a system of dialogs on the site (like VKontakte) under HighLoad.
Current architecture: Apache PHP-FPM (ver. 7), static on NGINX, MySQL DB 0.2TB.
How to correctly implement a layer with node.js, and where is it better to store the messages themselves?
Should I use Redis and how to keep messages even after reboot?
What other options are available for implementation?
Answer the question
In order to leave comments, you need to log in
Store in the database as standard, and deliver to customers using centrifugo
With Redis, it will be difficult for you to scale. You will have to make N redis servers on the backend. And come up with your own mechanics for distributing loads between them. By type "Vasya and Dima" communicate on the basis of Redis1, and "Vasya and Kolya" on Redis2. And in case of loads, provide the ability to connect new Redis3 to the cage on the fly in case of server overflow. And of course this is for fresh chats. Older ones need to be unloaded from Redis and put in a Postgres or Mysql archive.
Can I take a ready-made jabber server? For example, ejabberd.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question