Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Internet scaleservice

1,420 views

Published on

Internet Scale Service

Published in: Engineering
  • Be the first to comment

Internet scaleservice

  1. 1. Internet Scale Service charsyam@naver.com
  2. 2. About Me •KakaoStory Backend Engineer •Redis Contributor •Apache Tajo Committer
  3. 3. Internet Scale Service
  4. 4. High Scale Service
  5. 5. Mass Traffic Huge Users Many IDCs
  6. 6. Build Internet Scale Service
  7. 7. Paper https://www.usenix.org/legacy/event/lisa07/tech/full_pape rs/hamilton/hamilton_html/
  8. 8. Check List https://gist.github.com/acolyer/95ef23 802803cb8b4eb5
  9. 9. What should be considered?
  10. 10. Your Service is Elastic?
  11. 11. Sharding Shared Nothing
  12. 12. Shared Nothing
  13. 13. Stateless
  14. 14. Stateless Load Balancer Storage Layer API Servers API Servers API Servers API Servers
  15. 15. Stateless Load Balancer Storage Layer API Servers API Servers API Servers API Servers
  16. 16. Need Log Collector
  17. 17. Sharding
  18. 18. Database Partitioning
  19. 19. Vertical Partitioning
  20. 20. Horizontal Partitioning
  21. 21. Sharding = Horizontal Partitioning
  22. 22. But Not only DB
  23. 23. Searching Key
  24. 24. Range User #1 User #10 User #1000000 User #1000001 User #1000100 User #2000000 User #2000001 User #2000200 User #3000000 User #1000005
  25. 25. Moduler User #1 User #4 User #7 User #2 User #5 User #8 User #3 User #6 User #9 User #0 #0 / 3 = 0
  26. 26. 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
  27. 27. Searching Key with Coordinator
  28. 28. Clustering
  29. 29. Don’t need Search Key
  30. 30. Hbase Cassandra MongoDB etc
  31. 31. Mature But Not Mature
  32. 32. Cache Solution
  33. 33. Memcached/Redis
  34. 34. Memcached Chunk Slab Algorithm
  35. 35. Redis Collections Replication
  36. 36. Redis is Single Threaded
  37. 37. Redis 150,000 TPS In commodity server
  38. 38. Redis Must manage Redis Memory(RSS)
  39. 39. Redis Don’t execute long-time Spend Commands.
  40. 40. Cache is Storage Server Cache #1 Cache #2 Cache #3 Cache #4 Searching Key
  41. 41. Client Side Load Balancing Server Cache #1 Cache #2 Cache #3 Cache #4 Searching Key Cache #1 Cache #2 Cache #3 Cache #4 Coordinator
  42. 42. Server Side Load Balancing proxy Cache #1 Cache #2 Cache #3 Cache #4 Searching Key Server
  43. 43. Circuit Breaker
  44. 44. How many API Calls?
  45. 45. If one call fails?
  46. 46. Fast FailBack and Background Check
  47. 47. Netflix Hystrix
  48. 48. Using Coordinator
  49. 49. Zookeeper Consul Etcd
  50. 50. Get Configuration From Coordinator
  51. 51. Servers List Feature Flags
  52. 52. Failover
  53. 53. VIP Dynamic DNS
  54. 54. VIP Server DB Master 192.168.0.10 DB Slave 192.168.0.11 VIP 192.168.0.12
  55. 55. VIP Server DB Master 192.168.0.10 DB Slave 192.168.0.11 VIP 192.168.0.12
  56. 56. Dynamic DNS Server DB Master 192.168.0.10 DB Slave 192.168.0.11 db1-master.a.com
  57. 57. Dynamic DNS Server DB Master 192.168.0.10 DB Slave 192.168.0.11 db1-master.a.com
  58. 58. Must Check Environments For Dynamic DNS
  59. 59. JVM DNS Cache Issue
  60. 60. Latency #1
  61. 61. Latency #1 IDC 1 IDC 2 API Server DB Server Latency 50ms
  62. 62. What Happen?
  63. 63. 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
  64. 64. Latency #1 IDC 1 IDC 2 API Server DB Server getMembersList() results Logic Server
  65. 65. Latency #2
  66. 66. QnA
  67. 67. Thanks

×