Share
Embed
High-Speed Distribution to Enormous Group Using Pub/Sub of Redis
Kazuya Horiuchi
LINE / Development Team H / Engineer
https://linedevday.linecorp.com/2021/ja/sessions/115
https://linedevday.linecorp.com/2021/en/sessions/115
https://linedevday.linecorp.com/2021/ko/sessions/115
LINE DEVDAY 2021
November 11, 2021
Transcript
31 slides
-
Agenda - What is LINE LIVE - LINE LIVE Chat
System - Architecture Introduction - Diversion of new architecture - For even safer operation - How are the results -
What is LINE LIVE - LIVE Streaming service - Streams
from celebrities, companies and other users - Support the broadcaster with cheer items and free hearts - Communication using chat comments - Real time is important -
- LIVE Streaming service - Streams from celebrities, companies and
other users - Support the broadcaster with cheer items and free hearts - Communication using chat comments - Real time is important What is LINE LIVE -
- Parallel processing using Akka - Client-to-Server communication using WebSocket
- Server-to-Server communication using Pub/Sub of Redis - Temporary storage of chat data in Redis - Permanent storage of chat data in MySQL from Redis - Control comments by user or system configuration LINE LIVE Chat System Core Part Introduction -
- Parallel processing using Akka - Client-to-Server communication using WebSocket
- Server-to-Server communication using Pub/Sub of Redis - Temporary storage of chat data in Redis - Permanent storage of chat data in MySQL from Redis - Control comments by user or system configuration LINE LIVE Chat System Core Part Introduction -
Conventional Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Broadcaster Block LIVE Viewer A Send comments Save the block info MySQL Send the block info WebSocket MySQL local cache or MySQL Save the block info Internal API Chat No comments will be sent Other LIVE Viewer LINE LIVE API No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer LIVE Viewer A -
Conventional Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Broadcaster Block LIVE Viewer A Send comments Save the block info MySQL Send the block info WebSocket MySQL local cache or MySQL Save the block info Internal API Chat No comments will be sent Other LIVE Viewer LINE LIVE API No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer LIVE Viewer A -
Conventional Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Broadcaster Block LIVE Viewer A Send comments Save the block info MySQL Send the block info WebSocket MySQL local cache or MySQL Save the block info Internal API Chat No comments will be sent Other LIVE Viewer LINE LIVE API No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer LIVE Viewer A -
Conventional Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Broadcaster Block LIVE Viewer A Send comments Save the block info MySQL Send the block info WebSocket MySQL local cache or MySQL Save the block info Internal API Chat No comments will be sent Other LIVE Viewer LINE LIVE API No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer No comments will be sent Other LIVE Viewer LIVE Viewer A -
New Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Viewer Set chat decoration Send comment Update chat decoration settings Set chat decoration WebSocket Redis Subscribe & local cache Publish Internal API Chat Decorated comment Other LIVE Viewer LINE LIVE API Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer MySQL -
New Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Viewer Set chat decoration Send comment Update chat decoration settings MySQL Set chat decoration WebSocket Redis Subscribe & local cache Publish Internal API Chat Decorated comment Other LIVE Viewer LINE LIVE API Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer -
New Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Viewer Set chat decoration Send comment Update chat decoration settings MySQL Set chat decoration WebSocket Redis Subscribe & local cache Publish Internal API Chat Decorated comment Other LIVE Viewer LINE LIVE API Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer -
New Architecture How to distribute the configuration in a LINE
LIVE Chat System API LIVE Viewer Set chat decoration Send comment Update chat decoration settings MySQL Set chat decoration WebSocket Redis Subscribe & local cache Publish Internal API Chat Decorated comment Other LIVE Viewer LINE LIVE API Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer Decorated comment Other LIVE Viewer -
Diversion of new architecture Use cases where the new architecture
can be assumed to be diverted -
Diversion of new architecture Use cases where the new architecture
can be assumed to be diverted API Publish system notification Save system notification MySQL Publish system notification WebSocket Redis Subscribe Publish Internal API Chat Send system notification LIVE Viewer LINE LIVE API Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Internal CMS -
Diversion of new architecture Use cases where the new architecture
can be assumed to be diverted API Send system notification Save system notification MySQL Send system notification WebSocket Redis Subscribe Publish Internal API Chat Send system notification LIVE Viewer LINE LIVE API Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Internal CMS -
Diversion of new architecture Use cases where the new architecture
can be assumed to be diverted API Publish system notification Save system notification MySQL Publish system notification WebSocket Redis Subscribe Publish Internal API Chat Send system notification LIVE Viewer LINE LIVE API Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Send system notification LIVE Viewer Internal CMS -
Redis Subscribe health check Improving the fault tolerance of Redis
Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Listen Listen Listen Listen -
Redis Subscribe health check Improving the fault tolerance of Redis
Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Listen failed Listen Listen Listen -
Redis Subscribe health check Improving the fault tolerance of Redis
Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Listen failed Listen Listen Listen Publish (ping) -
Redis Subscribe health check Improving the fault tolerance of Redis
Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Subscribe (ping) Subscribe (ping) failed Subscribe (ping) Subscribe (ping) Subscribe (ping) Publish (ping) -
Redis Subscribe health check Improving the fault tolerance of Redis
Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Reconnect Listen Listen Listen -
How are the results - So far, we've been able
to operate without any major problems. - New features are ready to be implemented quickly using this architecture. - The new feature has been well received by users.