O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

GR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and Hystrix

400 visualizações

Publicada em

Vizceral is a tool from Netflix to visualize traffic between components. This data needs to be fed from somewhere however. Hystrix provides fault tolerance, and a nice stream of all metrics. Turbine aggregates the hystrix streams per cluster.

In this talk we will go through all the steps to use Hystrix in a Groovy app and expose those metrics for Vizceral

Publicada em: Software
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

GR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and Hystrix

  1. 1. Real Time Traffic Visualization with Vizceral and Hystrix Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  2. 2. Who am I? Roberto Perez Alcolea • Mexican • RedSky Team @ Target • Groovy Enthusiast • roberto@perezalcolea.info • @rpalcolea Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  3. 3. Traffic VisualizationRoberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  4. 4. Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  5. 5. Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  6. 6. Hystrix + Turbine + Vizceral Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  7. 7. Hystrix Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  8. 8. Hystrix Library to help control interactions between distributed services • Times out slow commands • Rate limit number of concurrent commands • Circuit breaker • Fallback on failures • Real-Time dashboard for visibility • Measurements Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  9. 9. Hystrix ... private static final HystrixObservableCommand.Setter hystrixSetter = HystrixObservableCommand.Setter .withGroupKey(HystrixCommandGroupKey.Factory.asKey("github-service")) .andCommandKey(HystrixCommandKey.Factory.asKey("GithubService.getRepositories")) .andCommandPropertiesDefaults(HystrixCommandProperties.defaultSetter()) ... Observable<Map> call(String language) { return new HystrixObservableCommand<Map>(hystrixSetter) { @Override protected Observable<Map> construct() { return getRepositories(language) } @Override protected Observable<Map> resumeWithFallback() { return Observable.just([:]) } }.toObservable() } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  10. 10. Hystrix ... private static final HystrixObservableCommand.Setter hystrixSetter = HystrixObservableCommand.Setter .withGroupKey(HystrixCommandGroupKey.Factory.asKey("github-service")) .andCommandKey(HystrixCommandKey.Factory.asKey("GithubService.getRepositories")) .andCommandPropertiesDefaults(HystrixCommandProperties.defaultSetter()) ... Observable<Map> call(String language) { return new HystrixObservableCommand<Map>(hystrixSetter) { @Override protected Observable<Map> construct() { return getRepositories(language) } @Override protected Observable<Map> resumeWithFallback() { return Observable.just([:]) } }.toObservable() } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  11. 11. Hystrix Flow Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  12. 12. Isolation Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  13. 13. Hystrix Command Metrics { "type": "HystrixCommand", "name": "GithubService.findRepositories", "group": "github-api", "currentTime": 1498355684319, "isCircuitBreakerOpen": false, "errorPercentage": 0, "errorCount": 0, "requestCount": 1, "rollingCountBadRequests": 0, "rollingCountCollapsedRequests": 0, "rollingCountEmit": 1, "rollingCountExceptionsThrown": 0, "rollingCountFailure": 0, "rollingCountFallbackFailure": 0, "rollingCountFallbackRejection": 0, "rollingCountFallbackSuccess": 0, "rollingCountResponsesFromCache": 0, "rollingCountSemaphoreRejected": 0, "rollingCountShortCircuited": 0, "rollingCountSuccess": 1, "rollingCountThreadPoolRejected": 0, "rollingCountTimeout": 0, "currentConcurrentExecutionCount": 0, "rollingMaxConcurrentExecutionCount": 1, "latencyExecute_mean": 0, "latencyExecute": { "99": 0, }, "latencyTotal_mean": 0, "latencyTotal": { "99": 0, }, } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  14. 14. Hystrix Command Metrics { "type": "HystrixCommand", "name": "GithubService.findRepositories", "group": "github-api", "currentTime": 1498355684319, "isCircuitBreakerOpen": false, "errorPercentage": 0, "errorCount": 0, "requestCount": 1, "rollingCountBadRequests": 0, "rollingCountCollapsedRequests": 0, "rollingCountEmit": 1, "rollingCountExceptionsThrown": 0, "rollingCountFailure": 0, "rollingCountFallbackFailure": 0, "rollingCountFallbackRejection": 0, "rollingCountFallbackSuccess": 0, "rollingCountResponsesFromCache": 0, "rollingCountSemaphoreRejected": 0, "rollingCountShortCircuited": 0, "rollingCountSuccess": 1, "rollingCountThreadPoolRejected": 0, "rollingCountTimeout": 0, "currentConcurrentExecutionCount": 0, "rollingMaxConcurrentExecutionCount": 1, "latencyExecute_mean": 0, "latencyExecute": { "99": 0, }, "latencyTotal_mean": 0, "latencyTotal": { "99": 0, }, } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  15. 15. Hystrix Command Metrics { "type": "HystrixCommand", "name": "GithubService.findRepositories", "group": "github-api", "currentTime": 1498355684319, "isCircuitBreakerOpen": false, "errorPercentage": 0, "errorCount": 0, "requestCount": 1, "rollingCountBadRequests": 0, "rollingCountCollapsedRequests": 0, "rollingCountEmit": 1, "rollingCountExceptionsThrown": 0, "rollingCountFailure": 0, "rollingCountFallbackFailure": 0, "rollingCountFallbackRejection": 0, "rollingCountFallbackSuccess": 0, "rollingCountResponsesFromCache": 0, "rollingCountSemaphoreRejected": 0, "rollingCountShortCircuited": 0, "rollingCountSuccess": 1, "rollingCountThreadPoolRejected": 0, "rollingCountTimeout": 0, "currentConcurrentExecutionCount": 0, "rollingMaxConcurrentExecutionCount": 1, "latencyExecute_mean": 0, "latencyExecute": { "99": 0, }, "latencyTotal_mean": 0, "latencyTotal": { "99": 0, }, } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  16. 16. Hystrix Command Metrics { "type": "HystrixCommand", "name": "GithubService.findRepositories", "group": "github-api", "currentTime": 1498355684319, "isCircuitBreakerOpen": false, "errorPercentage": 0, "errorCount": 0, "requestCount": 1, "rollingCountBadRequests": 0, "rollingCountCollapsedRequests": 0, "rollingCountEmit": 1, "rollingCountExceptionsThrown": 0, "rollingCountFailure": 0, "rollingCountFallbackFailure": 0, "rollingCountFallbackRejection": 0, "rollingCountFallbackSuccess": 0, "rollingCountResponsesFromCache": 0, "rollingCountSemaphoreRejected": 0, "rollingCountShortCircuited": 0, "rollingCountSuccess": 1, "rollingCountThreadPoolRejected": 0, "rollingCountTimeout": 0, "currentConcurrentExecutionCount": 0, "rollingMaxConcurrentExecutionCount": 1, "latencyExecute_mean": 0, "latencyExecute": { "99": 0, }, "latencyTotal_mean": 0, "latencyTotal": { "99": 0, }, } Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  17. 17. Hystrix DemoRoberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  18. 18. Hystrix Dashboard Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  19. 19. Turbine • Aggregates streams of Server-Sent Event (SSE) JSON data into a single stream • Clusters • Instance discovery Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  20. 20. Turbine (How it works) Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  21. 21. Vizceral Vizceral is a tool from Netflix to visualize traffic between components Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  22. 22. Putting All Together DemoRoberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  23. 23. Roberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017
  24. 24. Thank YouRoberto Perez Alcolea - @rpalcolea - GR8ConfUS 2017

×