Como manter a disponibilidade dos seus microservices através do monitoramento de métricas

Cad9d9d8998f49269ce4f28a018ba53e?s=47 Elder Moraes
November 29, 2019

Como manter a disponibilidade dos seus microservices através do monitoramento de métricas

Não é segredo que os microservices elevam muitas coisas no seu projeto: entre elas, a complexidade de gerenciamento.
Imagine que cena linda: vários serviços parando em efeito dominó, e você sem saber onde começou, o que aconteceu, e quem será o próximo a cair. Pesadelo!
Para isso existem as métricas e os processos de monitoramento. Com eles, você não precisa mais ser “reativo” (#trocadilhoalert). Ao contrário, pode se preparar para o que der e vier.
Junte-se a nós para entender como usar métricas para manter seus microservices disponíveis e como isso pode ser feito utilizando Helidon.

Cad9d9d8998f49269ce4f28a018ba53e?s=128

Elder Moraes

November 29, 2019
Tweet

Transcript

  1. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 1
  2. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 2 Como manter a disponibilidade de microservices através do monitoramento de métricas Elder Moraes | @elderjava Developer Advocate Novembro, 2019
  3. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation.
  4. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 5
  5. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Métricas 6
  6. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Métrica é uma medida para avaliar, controlar e/ou selecionar quantitativamente: uma pessoa, um processo, um evento ou uma instituição 7
  7. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Métrica vs Health Check 8
  8. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | RockyBalboaService 9
  9. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 10 • Força do soco: 100% • Sangramento: 0 ml/s • Visão: 100% • Nível suor: 1 ml/s • Confiança: 10 • Pronúncia: Adrian! • Força do soco: 0,5% • Sangramento: 100 ml/s • Visão: -10% • Nível suor: 2000 ml/s (baldes) • Confiança: 0 • Pronúncia: Ãnhãnãããnnnn
  10. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Microprofile: 3 tipos de métricas • base – JVM – Threads – Thread Pools – Classloading – SO • vendor • application 11
  11. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 12 JSON PROMETHEUS REST API
  12. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 13 REST API /metrics /metrics/base /metrics/vendor /metrics/application
  13. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 14 Formato Gauge JSON
  14. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 15 Formato Counter JSON
  15. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 16 Formato Meter JSON
  16. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 17 Formato Histogram JSON
  17. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 18 Formato Timer JSON
  18. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Todos possuem equivalentes no formato Prometheus 19
  19. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Código orientado a métricas 20
  20. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 21 Annotation
  21. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 22 Annotation Aplica-se a Descrição @Counted M, C, T Contabiliza a quantidade de invocações do objeto anotado @Gauge M Medidor que exibe o valor do objeto anotado @Metered M, C, T Mede a frequência de invocações do objeto anotado @Timed M, C, T Mede o tempo de duração do objeto anotado (C=Constructor, M=Method, T=Type)
  22. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | Helidon 23
  23. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | • É um conjunto de APIs para desenvolvimento de microservices • Open Source (Apache 2.0) • Helidon SE: microframework • Helidon MP: MicroProfile 24
  24. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 25
  25. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 26 Arquitetura
  26. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 27 Código Helidon SE
  27. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 28 Código Helidon MP
  28. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | DEMO TIME!!! 29
  29. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | @elderjava book.eldermoraes.com
  30. Copyright © 2019, Oracle and/or its affiliates. All rights reserved.

    | 32