C
C
carroll2016-04-28 16:07:53
PHP
carroll, 2016-04-28 16:07:53

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

4 answer(s)
I
Ilya, 2016-04-28
@FireGM

Store in the database as standard, and deliver to customers using centrifugo

N
Nikolai, 2016-04-28
@evikbook

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.

K
Konstantin Kitmanov, 2016-04-28
@k12th

Can I take a ready-made jabber server? For example, ejabberd.

C
carroll, 2016-04-28
@carroll

Will linking a node with a muscle break the system? Allocate a separate server with a node and a database, implement api, interact with this server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question