This document summarizes how LINE messaging uses Redis. It discusses:
- How LINE has scaled Redis from 3 nodes in 2011 to over 14,000 nodes today to support over 25 billion messages per day.
- The key ways LINE uses Redis, including for storing sequences, caches, secondary indexes, and local queues.
- Challenges LINE faced in scaling their in-house Redis cluster to over 1,000 nodes and workarounds they developed.
- How LINE monitors Redis for slow commands, bursting operations, and connections to address performance issues.
- Future work LINE is doing with Redis 4 and improving latency and scalability.
Introduction of Shunsuke Nakamura, Redis team lead. Overview of LINE's storage infrastructure using HBase, focusing on scalability.
Discusses the use of Redis at LINE, including 25 billion messages per day and main agenda points about messaging infrastructure.
Evolution of Redis usage at LINE over the years, showcasing the growth from in-memory Redis with sharding to extensive infrastructure with 14,000 nodes.
Architecture of messaging system using Redis for storing sequences, events, and caching mechanisms for messaging delivery.
Technical specifications of Redis servers, including versions used, configurations, and handling strategies for enhanced performance.
Challenges in in-house Redis cluster management including replicas, dynamic resizing, and handling gossip traffic with over 1,400 master nodes.
Technical issues faced with Redis 3.2 clusters, including memory overhead, synchronization challenges, and implementations for improvement.
Management of slow commands, performance bursts, and monitoring measures taken to optimize Redis operations within LINE.
Future works on Redis at LINE including improvements in cluster, API server connections, and addressing scalability challenges.
About me
● :(Shunsuke Nakamura)
● : LINE LINE 1 7
● : Redis team lead, messaging server tech lead
●
● : LINE HBase scalability
● :
● Storage infrastructure using HBase behind LINE messages
https://www.slideshare.net/naverjapan/storage-infrastructure-using-hbase-behind-line-
messages
● HBase Redis 100 / LINE
https://www.slideshare.net/linecorp/a-5-47983106
3.
Redis Talk forLINE messaging
●
● RedisConf18 @ San Francisco
● Redis at LINE, 25 Billion Messages Per Day
https://www.slideshare.net/RedisLabs/redisconf18-redis-at-
line-25-billion-messages-per-day (open today!)
● Tech Planet 2015 @ Korea
● LINE Redis Cluster
https://www.slideshare.net/lovejinstar/redis-at-line-tech-
planet-2015
●
4.
Agenda
● How LINEmessaging uses Redis
● Redis details for LINE messaging
● Challenge to Redis3.2 official cluster
● Redis hotspots daily handling
5.
● 2011 LINEmessaging Redis
● messaging in-memory
● Redis 3 x2 (master/slave) client side sharding
Redis for LINE messaging (As of 2011.6)
● sequences
● user/group/messagesequence ID
● event revision
● caches
● message event TTL time series data
● immutable read heavy data
LINE is powered by Redis
● storages
● secondary index (ex. follower list)
● CAS (ex. unread badge count)
● local queue in each API servers
● API server async task ( IO )
● IO RPC context
8.
1.App. calls sendMessagethrift API
2.Acquire messageId from Redis sequence
3.Store Message, Event into Redis caches
1.Store into HBase storage
2.Enqueue task to local Redis queue if failed
4.Check receiver info with Redis storages
5.Deliver and notify event to receivers
How messaging
uses Redis
G a t e w a y
A P I s e r v e r s
…
queue
… …
… … …
1. sendMessage
sequence
caches
storages
2.acquire
messageId
3.store
Message
4. check
receiver info
5. notify
9.
Redis server atLINE
● Redis version 2.8 ~ 3.2
●
● Multiple nodes per host
● 10 Gbps network
● Redis node NIC interrupt CPU affinity
● Redis node
● standalone : master slave 1 1, host role slave
● disk less : No BGSAVE backup, No AOF, No Virtual Memory
● non HA : No Sentinel, No slave read