Internet Scale Service
charsyam@naver.com
About Me
•KakaoStory Backend Engineer
•Redis Contributor
•Apache Tajo Committer
Internet Scale Service
High Scale Service
Mass Traffic
Huge Users
Many IDCs
Build
Internet Scale Service
Paper
https://www.usenix.org/legacy/event/lisa07/tech/full_pape
rs/hamilton/hamilton_html/
Check List
https://gist.github.com/acolyer/95ef23
802803cb8b4eb5
What should be
considered?
Your Service is Elastic?
Sharding
Shared Nothing
Shared Nothing
Stateless
Stateless
Load Balancer
Storage Layer
API
Servers
API
Servers
API
Servers
API
Servers
Stateless
Load Balancer
Storage Layer
API
Servers
API
Servers
API
Servers
API
Servers
Need Log Collector
Sharding
Database Partitioning
Vertical Partitioning
Horizontal Partitioning
Sharding = Horizontal
Partitioning
But Not only DB
Searching Key
Range
User #1
User #10
User #1000000
User #1000001
User #1000100
User #2000000
User #2000001
User #2000200
User #3000000
User #1000005
Moduler
User #1
User #4
User #7
User #2
User #5
User #8
User #3
User #6
User #9
User #0
#0 / 3 = 0
Indexed
User #5000 Index Server
User #1
User #2000
User #1000000
User #2
User #2001
User #10000
User #3
User #6
User #5000
#5000 is in Server2
Searching Key
with
Coordinator
Clustering
Don’t need
Search Key
Hbase
Cassandra
MongoDB
etc
Mature
But
Not Mature
Cache Solution
Memcached/Redis
Memcached
Chunk
Slab Algorithm
Redis
Collections
Replication
Redis is Single Threaded
Redis
150,000 TPS
In commodity server
Redis
Must manage
Redis Memory(RSS)
Redis
Don’t execute long-time
Spend Commands.
Cache is Storage
Server
Cache #1
Cache #2
Cache #3
Cache #4
Searching Key
Client Side Load Balancing
Server
Cache #1
Cache #2
Cache #3
Cache #4
Searching Key
Cache #1
Cache #2
Cache #3
Cache #4
Coordinator
Server Side Load Balancing
proxy
Cache #1
Cache #2
Cache #3
Cache #4
Searching Key
Server
Circuit Breaker
How many API Calls?
If one call fails?
Fast FailBack
and Background Check
Netflix Hystrix
Using Coordinator
Zookeeper
Consul
Etcd
Get Configuration
From Coordinator
Servers List
Feature Flags
Failover
VIP
Dynamic DNS
VIP
Server
DB Master
192.168.0.10
DB Slave
192.168.0.11
VIP 192.168.0.12
VIP
Server
DB Master
192.168.0.10
DB Slave
192.168.0.11
VIP 192.168.0.12
Dynamic DNS
Server
DB Master
192.168.0.10
DB Slave
192.168.0.11
db1-master.a.com
Dynamic DNS
Server
DB Master
192.168.0.10
DB Slave
192.168.0.11
db1-master.a.com
Must Check
Environments
For Dynamic DNS
JVM DNS Cache Issue
Latency #1
Latency #1
IDC 1 IDC 2
API Server DB Server
Latency 50ms
What Happen?
Latency #1
IDC 1 IDC 2
API Server DB Server
Select * from posts where id=123;
results
Select member from members
where id=poster.group;
results
Latency #1
IDC 1 IDC 2
API Server
DB Server
getMembersList()
results
Logic Server
Latency #2
QnA
Thanks

Internet scaleservice