Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High-Speed Distribution to Enormous Group Using Pub/Sub of Redis

High-Speed Distribution to Enormous Group Using Pub/Sub of Redis

LINE DEVDAY 2021

November 11, 2021
Tweet

More Decks by LINE DEVDAY 2021

Other Decks in Technology

Transcript

  1. Agenda - What is LINE LIVE - LINE LIVE Chat

    System - Architecture Introduction - Diversion of new architecture - For even safer operation - How are the results
  2. 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
  3. - 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
  4. - 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
  5. - 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. Redis Subscribe health check Improving the fault tolerance of Redis

    Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Listen Listen Listen Listen
  18. Redis Subscribe health check Improving the fault tolerance of Redis

    Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Listen failed Listen Listen Listen
  19. 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)
  20. 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)
  21. Redis Subscribe health check Improving the fault tolerance of Redis

    Subscribe Redis Subscriber Subscriber Subscriber Subscriber Subscriber Listen Reconnect Listen Listen Listen
  22. 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.