Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building reliable APIs

Building reliable APIs

67f4a8f2a209a38d7242829947b26ba3?s=128

mattheath

July 10, 2018
Tweet

Transcript

  1. Building Reliable APIs Matt Heath, Monzo

  2. Matt Heath, Monzo @mattheath

  3. None
  4. None
  5. monoliths traditional dev

  6. None
  7. What do we mean by “reliable”?

  8. None
  9. Contacting us Using your debit card Making payments Freezing your

    card 
 Viewing your balance Viewing recent transactions Sending emoji reactions Setting your profile picture Viewing merchant logos
  10. Contacting us Using your debit card Making payments Freezing your

    card 
 Viewing your balance Viewing recent transactions Sending emoji reactions Setting your profile picture Viewing merchant logos
  11. ?

  12. Application

  13. Application

  14. APPLICATION Application

  15. None
  16. None
  17. ?

  18. None
  19. API

  20. API

  21. API Gateway API Service API Service API Service API Service

    API Service API Service API Service API Service
  22. None
  23. None
  24. None
  25. API Gateway Accounts Cards Pots Emojis Payments …

  26. API Gateway Accounts Cards Pots Emojis Payments … New
 Exciting


    API!!
  27. Cards Pots Emojis Payments … API Gateway Accounts New
 Exciting


    API!!
  28. Cards Pots Emojis Payments … API Gateway Accounts New
 Exciting


    API!!
  29. API Gateway Accounts Cards Pots Emojis Payments … New
 Exciting


    API!!
  30. None
  31. pod

  32. pod container container container

  33. pod API service

  34. pod

  35. pod

  36. pods replica set

  37. replica set pods deployment

  38. pods replica set deployment

  39. pods replica set deployment change

  40. deployment change old pods old replica set

  41. deployment change old pods old replica set new replica set

  42. deployment change old pods old replica set new replica set

    new pod
  43. deployment change old pods old replica set new replica set

    new pod
  44. deployment change old replica set new pods new replica set

  45. deployment change new replica set new pods

  46. deployment replica set pods

  47. pods

  48. pods service

  49. pods service kubedns

  50. pods service routing - static cluster IP managed replicas resource

    allocations rollout strategies liveness checks anti-affinity, etc kubedns routing - “service name”
  51. ?

  52. machine

  53. machine machine

  54. machine machine machine machine machine machine

  55. machine machine machine machine machine machine Kubernetes

  56. machine machine machine machine machine kubelet

  57. kubelet kubelet kubelet kubelet kubelet kubelet

  58. kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master

  59. kubelet kubelet kubelet kubelet kubelet kubelet Kubernetes Master etcd

  60. kubernetes

  61. kubernetes service service service service service service service service service

    service
  62. kubernetes service service service service service service service service service

    service
  63. kubernetes service service service service service service service service service

    service
  64. kubernetes service service service service service service service service service

    service
  65. kubernetes service service service service service service service service service

    service service service service
  66. kubernetes service service service service service service service service service

    service
  67. Reliable inter-service communication

  68. Service Service

  69. Service Service Service Service

  70. Service Service Service Service Kubernetes
 Service

  71. Service Discovery Load Balancing Timeouts and Expirations Retries Rate Limiting

    Connection Pooling Circuit Breaking Failure Detection Metrics and Tracing Interrupts Context Propagation
  72. Service Discovery Load Balancing Timeouts and Expirations Retries Rate Limiting

    Connection Pooling Circuit Breaking Failure Detection Metrics and Tracing Interrupts Context Propagation
  73. Service Service Service Service ?

  74. Service Service Service Service linkerd

  75. Service linkerd

  76. Service linkerd service
 discovery

  77. Service Service Service Service linkerd service
 discovery

  78. Service Service Service Service linkerd

  79. Service Service Service Service linkerd

  80. Service Service Service Service linkerd

  81. Service Service Service Service linkerd

  82. Event Driven
 Architecture

  83. Service A Service B Load Balancer Edge Gateway API Service

  84. API Service Service A Service B Load Balancer Edge Gateway

  85. API Service Service A Service B Load Balancer Edge Gateway

    Service D Service E
  86. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E
  87. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E
  88. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E
  89. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E
  90. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E Service D
  91. API Service Service A Service B Load Balancer Edge Gateway

    Service C Service D Service E Service D
  92. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  93. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  94. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  95. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  96. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  97. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  98. None
  99. API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed

    apns API card-api card-processing cards transactions balance transaction-enrichment merchant feed-generator feed apns
  100. None
  101. Critical Path

  102. How do we make systems reliable?

  103. Masterless systems No single points of failure Simple / small

    components Minimise critical path Queue deferrable tasks Automated failure correction
  104. None
  105. None
  106. None