Successfully reported this slideshow.

[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기

37

Share

1 of 83
1 of 83

[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기

37

Share

Download to read offline

지난 2018년 4월 21일 열렸던 Spring Camp 2018 행사에서 공유한 11번가의 지난 1년간의 MSA 전환에 관한 발표 자료입니다. 행사의 성격에 맞추어 발표의 내용은 Spring Cloud에 관한 것에 Focus 맞춰 있습니다.

지난 2018년 4월 21일 열렸던 Spring Camp 2018 행사에서 공유한 11번가의 지난 1년간의 MSA 전환에 관한 발표 자료입니다. 행사의 성격에 맞추어 발표의 내용은 Spring Cloud에 관한 것에 Focus 맞춰 있습니다.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

[Spring Camp 2018] 11번가 Spring Cloud 기반 MSA로의 전환 : 지난 1년간의 이야기

  1. 1. “나의 과감한 수정은 전사 장애다 !”
  2. 2. “어떻게 서버 분리를 진행할 것인가 ?”
  3. 3. WAR Front/Mobile WAS Legacy WAR Front/Mobile WAS Hybrid MSA REST
 API MSA Platform API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server
  4. 4. Spring Cloud
  5. 5. public String anyMethodWithExternalDependency() { // REST API } @HystrixCommand public class SampleCommand extends HystrixCommand<String> { @Override protected String run() { // REST API } }
  6. 6. hystrix.command.<commandKey>. (1)metrics.rollingStats.timeInMilliseconds - Default 10 (2)circuitBreaker.requestVolumeThreshold - Default 20 (3)circuitBreaker.errorThresholdPercentage - Default 50% (4)circuitBreaker.sleepWindowInMilliseconds - Default 5 “ ”
  7. 7. @HystrixCommand(commandKey = “ExtDep1”) public String anyMethodWithExternalDependency1() { // - #1 } @HystrixCommand(commandKey = “ExtDep1”) public String anyMethodWithExternalDependency2() { // - #2 } “ ”
  8. 8. @HystrixCommand(commandKey = “ExtDep1”, fallbackMethod=“recommendFallback”) public String anyMethodWithExternalDependency1() { // } public String recommendFallback() { return “< ”; }
  9. 9. “ ”
  10. 10. hystrix.command.<commandKey>. execution.isolation.thread.timeoutInMilliseconds - Default 1
  11. 11. “ ”
  12. 12. “이 세가지를 작 적용하면 MSA 환경에서 Server 들간의 통신을 큰 문제없이 잘 될 것 같다는 생각...”
  13. 13. “100% 자체 개발한 API Gateway를 두고 Zuul을 도입해야 할까 ?”
  14. 14. WAR Front/Mobile WAS REST
 API MSA Platform API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server API Server Spring Cloud Zuul
  15. 15. API Server API Server API Server API Server API Server API Server Spring Cloud Zuul API Server API Server API Server Product API Server Display API Server Member API Server Hystrix Command Ribbon Client Eureka Client Http Client “ ”
  16. 16. hystrix.command.[product|display|member]. (1)metrics.rollingStats.timeInMilliseconds - Default 10 (2)circuitBreaker.requestVolumeThreshold - Default 20 (3)circuitBreaker.errorThresholdPercentage - Default 50% (4)circuitBreaker.sleepWindowInMilliseconds - Default 5
  17. 17. API Server API Server API Server API Server API Server API Server Spring Cloud Zuul API Server API Server API Server Product API Server Display API Server Member API Server
  18. 18. zuul: ribbon-isolation-strategy: thread
  19. 19. API Server API Server API Server API Server API Server API Server Spring Cloud Zuul API Server API Server API Server Product API Server Display API Server Member API Server “이건 우리가 원하던 모습이 아니다 !“
  20. 20. API Server API Server API Server API Server API Server API Server Spring Cloud Zuul API Server API Server API Server Product API Server Display API Server Member API Server zuul: threadPool: useSeparateThreadPools: true threadPoolKeyPrefix: zuulgw
  21. 21. “MSA 플랫폼 내부의 API Server 간의 호출은 어떻게 할것인가 ?” API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API GW API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API GW
  22. 22. “ ”
  23. 23. Hystrix Command Ribbon Client Eureka Client Http Client
  24. 24. “Hystrix, Eureka, Ribbon을 사용한 우리 System은 어느정도 Resilient 한거야 ? ”
  25. 25. API Server API Server API Server Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon
  26. 26. <product>: ribbon: MaxAutoRetries: 0 MaxAutoRetriesNextServer: 2 retryableStatusCodes: 503 “ ”
  27. 27. “ ”
  28. 28. “Hystrix는 뭐하고 있니 ?” API Server API Server API Server Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon
  29. 29. Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon API Server API Server API Server
  30. 30. API ServerAPI ServerAPI Server WAR Front/Mobile WAS REST
 API Spring Cloud Zuul API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API ServerAPI ServerAPI ServerAPI ServerAPI ServerAPI Server Eureka Server API ServerAPI ServerAPI Server Hystrix + Ribbon + Eureka Spring Cloud Feign Hystrix + Eureka + Ribbon
  31. 31. API ServerAPI ServerAPI Server WAR Front/Mobile WAS REST
 API Spring Cloud Zuul API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API ServerAPI ServerAPI ServerAPI ServerAPI ServerAPI Server Eureka Server API ServerAPI ServerAPI Server Hystrix + Ribbon + Eureka Spring Cloud Config Server
  32. 32.
  33. 33. API ServerAPI ServerAPI Server WAR Front/Mobile WAS REST
 API Spring Cloud Zuul API ServerAPI ServerAPI Server API ServerAPI ServerAPI Server API ServerAPI ServerAPI ServerAPI ServerAPI ServerAPI Server Eureka Server API ServerAPI ServerAPI Server Hystrix + Ribbon + Eureka Spring Cloud Config Server Zipkin Turbine Spring Boot Admin RabbitMQ InfluxDB
  34. 34. “기존 모니터링 시스템으로는 5%가 부족해 !”
  35. 35. Spring Cloud Zuul API Server API Server API Server API Server “ ”
  36. 36. Spring Cloud Zuul API Server API Server API Server API Server TraceID 1234 TraceID 1234 TraceID 1234 TraceID 1234
  37. 37. API ServerTraceID 1234 TraceID 1234 TraceID 1234 Thread Local
  38. 38. API ServerTraceID 1234 TraceID XXXX
  39. 39. “ ”
  40. 40. “다사다난 했던 1년 4개월”
  41. 41. “감사합니다.”
  42. 42. Spring Cloud Zuul http://<zuul>/product/v1/products/34343534 API Server API Server API Server API Server API Server API Server API Server API Server API Server http://<product>/v1/products/34343534 Product API Servers Member API Servers Display API Servers Eureka Server
  43. 43. Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon API Server API Server API Server
  44. 44. Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon API Server API Server API Server
  45. 45. Spring Cloud Zuul Product API Server Display API Server Hystrix Eureka Ribbon Hystrix Eureka Ribbon API Server API Server API Server

×