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

MiXiT 2017 Serverless

MiXiT 2017 Serverless

Serverless : transition du monolithique au système distribué [MiXiT 2017]

C'est l'histoire d'une application web. De base monolithique, elle a évolué pour intégrer de manière massive des technologies de type "serverless" (pool de 2000 AWS Lambda en production) : amélioration drastique des performances, meilleure expérience utilisateur. L'introduction de cette technologie a surtout transformé au plus profond l'architecture de l'application en un système distribué… et avec ma vision de tous mes futurs développements.

Ba2198386e326d6e3ca57b2271d861e9?s=128

Yves Brissaud

April 20, 2017
Tweet

Transcript

  1. Serverless transition du monolithique au système distribué MiXiT 2017 |

    @_crev_
  2. $ docker run squarescale/ybrissaud Yves Brissaud @_crev_ Your Cloud Native

    Infrastructure as a Service
  3. λ MiXiT 2017 | @_crev_

  4. Il était une fois MiXiT 2017 | @_crev_

  5. https://www.flickr.com/photos/64248265@N02/14002402266/ MiXiT 2017 | @_crev_

  6. AWS cloud MiXiT 2017 | @_crev_

  7. Amazon S3 Paperclip MiXiT 2017 | @_crev_

  8. Amazon S3 Paperclip • Upload • Resize • Info (imagemagick)

    MiXiT 2017 | @_crev_
  9. https://www.flickr.com/photos/emyanmei/7050219929 MiXiT 2017 | @_crev_

  10. MiXiT 2017 | @_crev_

  11. MiXiT 2017 | @_crev_

  12. MiXiT 2017 | @_crev_

  13. MiXiT 2017 | @_crev_

  14. MiXiT 2017 | @_crev_

  15. MiXiT 2017 | @_crev_

  16. MiXiT 2017 | @_crev_

  17. CPU

  18. MiXiT 2017 | @_crev_

  19. > 500 photos / utilisateur MiXiT 2017 | @_crev_

  20. > 500 photos / utilisateur ≃ 10 000 resize MiXiT

    2017 | @_crev_
  21. 100% CPU dans ImageMagick MiXiT 2017 | @_crev_

  22. MiXiT 2017 | @_crev_

  23. MiXiT 2017 | @_crev_

  24. MiXiT 2017 | @_crev_

  25. λ MiXiT 2017 | @_crev_

  26. MiXiT 2017 | @_crev_

  27. AWS Lambda est un service de calcul sans serveur qui

    exécute votre code en réponse à des événements et gère automatiquement les ressources de calcul sous-jacentes pour vous. https://aws.amazon.com/fr/lambda/details/ MiXiT 2017 | @_crev_
  28. Amazon S3 Paperclip • Upload • Resize • Info MiXiT

    2017 | @_crev_
  29. Amazon S3 Paperclip • Upload • Resize • Info MiXiT

    2017 | @_crev_
  30. AWS Lambda est un service de calcul sans serveur qui

    exécute votre code en réponse à des événements et gère automatiquement les ressources de calcul sous-jacentes pour vous. https://aws.amazon.com/fr/lambda/details/ MiXiT 2017 | @_crev_
  31. AWS Lambda est un service de calcul sans serveur qui

    exécute votre code en réponse à des événements et gère automatiquement les ressources de calcul sous-jacentes pour vous. https://aws.amazon.com/fr/lambda/details/ MiXiT 2017 | @_crev_
  32. Amazon S3 MiXiT 2017 | @_crev_

  33. Amazon S3 MiXiT 2017 | @_crev_

  34. Amazon S3 Lambda function MiXiT 2017 | @_crev_

  35. Amazon S3 Lambda function NodeJS + GraphicsMagick MiXiT 2017 |

    @_crev_
  36. Amazon S3 Lambda function MiXiT 2017 | @_crev_

  37. Amazon S3 Lambda function MiXiT 2017 | @_crev_

  38. Amazon S3 Lambda function ≈ 1.5 s / photo MiXiT

    2017 | @_crev_
  39. Amazon S3 Lambda function ≈ 1.5 s / photo 100

    λ MiXiT 2017 | @_crev_
  40. MiXiT 2017 | @_crev_

  41. En tant qu’utilisateur, afin de préparer ma vidéo, je veux

    découper et redimensionner chaque photo. — Da Backlog MiXiT 2017 | @_crev_
  42. > 500 photos / utilisateur MiXiT 2017 | @_crev_

  43. > 1800 photos / utilisateur MiXiT 2017 | @_crev_

  44. MiXiT 2017 | @_crev_

  45. MiXiT 2017 | @_crev_

  46. < 10 s MiXiT 2017 | @_crev_

  47. Amazon S3 Lambda function MiXiT 2017 | @_crev_

  48. Lambda function MiXiT 2017 | @_crev_

  49. Lambda function X 1800 MiXiT 2017 | @_crev_

  50. Lambda function X 1800 100 MiXiT 2017 | @_crev_

  51. Lambda function X 1800 100 > 10 s MiXiT 2017

    | @_crev_
  52. MiXiT 2017 | @_crev_

  53. 10 200 200 < 2 s MiXiT 2017 | @_crev_

  54. 10 200 200 < 2 s MiXiT 2017 | @_crev_

  55. Amazon S3 Lambda function MiXiT 2017 | @_crev_

  56. Amazon S3 Lambda function 1.5 - 2 s MiXiT 2017

    | @_crev_
  57. Amazon S3 Lambda function > 30 s MiXiT 2017 |

    @_crev_
  58. Amazon S3 Lambda function > 30 s MiXiT 2017 |

    @_crev_
  59. « Amazon, I Want Moar λ » MiXiT 2017 |

    @_crev_
  60. 2000 λ MiXiT 2017 | @_crev_

  61. Amazon S3 Lambda function > 30 s MiXiT 2017 |

    @_crev_
  62. Amazon S3 Lambda function ≈ 2 s MiXiT 2017 |

    @_crev_
  63. O RLY? MiXiT 2017 | @_crev_

  64. ≈ 3-4 secondes MiXiT 2017 | @_crev_

  65. ≈ 3-4 secondes Latence Appel des lambda non // Lambda

    utilisées MiXiT 2017 | @_crev_
  66. Click 3-4 s MiXiT 2017 | @_crev_

  67. MiXiT 2017 | @_crev_

  68. ? MiXiT 2017 | @_crev_

  69. Amazon SQS MiXiT 2017 | @_crev_

  70. CPU

  71. X 1800 MiXiT 2017 | @_crev_

  72. X 1800 MiXiT 2017 | @_crev_

  73. X 1800 MiXiT 2017 | @_crev_

  74. Amazon S3 Lambda function Amazon SQS Amazon RDS MiXiT 2017

    | @_crev_
  75. Amazon SQS Amazon RDS Lambda function Amazon S3 MiXiT 2017

    | @_crev_
  76. Amazon SQS Amazon RDS Amazon S3 Lambda function MiXiT 2017

    | @_crev_
  77. Amazon SQS Amazon S3 Lambda function Amazon RDS MiXiT 2017

    | @_crev_
  78. Amazon SQS Amazon S3 Lambda function Réseau local (vpc) Amazon

    RDS MiXiT 2017 | @_crev_
  79. Amazon SQS Amazon S3 Lambda function Réseau local (vpc) Amazon

    RDS Réseau local (vpc) S3 endpoint MiXiT 2017 | @_crev_
  80. Amazon SQS Amazon S3 Lambda function Réseau local (vpc) Amazon

    RDS Réseau local (vpc) S3 endpoint MiXiT 2017 | @_crev_
  81. Amazon SQS Amazon S3 Lambda function Réseau local (vpc) Amazon

    RDS Réseau local (vpc) S3 endpoint MiXiT 2017 | @_crev_
  82. Amazon SQS Amazon S3 Lambda function Réseau local (vpc) Amazon

    RDS Réseau local (vpc) VPC NAT gateway MiXiT 2017 | @_crev_
  83. MiXiT 2017 | @_crev_

  84. Lambda function Amazon S3 Amazon RDS Amazon SQS MiXiT 2017

    | @_crev_
  85. Lambda function Amazon S3 Amazon RDS Amazon SQS MiXiT 2017

    | @_crev_
  86. Lambda function Amazon S3 Amazon RDS Amazon SQS Réseau local

    (vpc) MiXiT 2017 | @_crev_
  87. MiXiT 2017 | @_crev_

  88. Amazon S3 Lambda function Amazon RDS Amazon SQS MiXiT 2017

    | @_crev_
  89. Amazon S3 Lambda function Amazon RDS Amazon SQS 2000 updates

    + lock MiXiT 2017 | @_crev_
  90. « When deploying containers + microservices, there is an unstated

    truth: you are developing a distributed system » — Bryan Cantrill, CTO of Joyent — Hashiconf http://www.slideshare.net/bcantrill/the-container-revolution-reflections-after-the-first-decade MiXiT 2017 | @_crev_
  91. « When deploying containers + microservices, there is an unstated

    truth: you are developing a distributed system » — Bryan Cantrill, CTO of Joyent — Hashiconf http://www.slideshare.net/bcantrill/the-container-revolution-reflections-after-the-first-decade serverless MiXiT 2017 | @_crev_
  92. MiXiT 2017 | @_crev_

  93. Amazon S3 MiXiT 2017 | @_crev_

  94. Amazon S3 DB clé => valeur MiXiT 2017 | @_crev_

  95. MiXiT 2017 | @_crev_

  96. Amazon S3 Status files MiXiT 2017 | @_crev_

  97. Amazon S3 Status files MiXiT 2017 | @_crev_

  98. Amazon S3 MiXiT 2017 | @_crev_

  99. Amazon S3 < 10 messages pour 2000 λ MiXiT 2017

    | @_crev_
  100. Amazon S3 < 2s < 4s < 1s MiXiT 2017

    | @_crev_
  101. Amazon S3 < 2s < 4s < 1s 1800 images

    crop + 2 resize < 10 s MiXiT 2017 | @_crev_
  102. MiXiT 2017 | @_crev_

  103. En production MiXiT 2017 | @_crev_

  104. MiXiT 2017 | @_crev_

  105. Monitoring ? Logs ? Erreurs? MiXiT 2017 | @_crev_

  106. MiXiT 2017 | @_crev_

  107. MiXiT 2017 | @_crev_

  108. Parfois ≃ temps de traitement MiXiT 2017 | @_crev_

  109. MiXiT 2017 | @_crev_

  110. MiXiT 2017 | @_crev_ Duration: 1618.91 ms Billed Duration: 1700

    ms Memory Size: 1536 MB Max Memory Used: 119 MB
  111. MiXiT 2017 | @_crev_

  112. MiXiT 2017 | @_crev_

  113. Boot ~ ms TTL < 2s x 2000 MiXiT 2017

    | @_crev_
  114. AWS Lambda est un service de calcul sans serveur qui

    exécute votre code en réponse à des événements et gère automatiquement les ressources de calcul sous-jacentes pour vous. https://aws.amazon.com/fr/lambda/details/ MiXiT 2017 | @_crev_
  115. AWS Lambda est un service de calcul sans serveur qui

    exécute votre code en réponse à des événements et gère automatiquement les ressources de calcul sous-jacentes pour vous. https://aws.amazon.com/fr/lambda/details/ MiXiT 2017 | @_crev_
  116. MiXiT 2017 | @_crev_ "This is what #serverless looks like

    to us at Google." serverlessconf London 2016
  117. MiXiT 2017 | @_crev_

  118. MiXiT 2017 | @_crev_

  119. MiXiT 2017 | @_crev_

  120. MiXiT 2017 | @_crev_ AWS Step Functions https://aws.amazon.com/fr/about-aws/whats-new/2017/03/aws-step-functions-adds-customized-error-handling-for-aws-lambda-functions/

  121. MiXiT 2017 | @_crev_

  122. MiXiT 2017 | @_crev_

  123. Par mois pour 2000 coeurs MiXiT 2017 | @_crev_

  124. MiXiT 2017 | @_crev_

  125. Amazon S3 Status files MiXiT 2017 | @_crev_

  126. Amazon DynamoDB MiXiT 2017 | @_crev_

  127. MiXiT 2017 | @_crev_

  128. https://github.com/eawsy/aws-lambda-go-shim MiXiT 2017 | @_crev_

  129. MiXiT 2017 | @_crev_

  130. MiXiT 2017 | @_crev_

  131. MiXiT 2017 | @_crev_

  132. MiXiT 2017 | @_crev_

  133. Keep It Simple, Stupid MiXiT 2017 | @_crev_

  134. I SEE λ EVERYWHERE MiXiT 2017 | @_crev_

  135. MiXiT 2017 | @_crev_

  136. MiXiT 2017 | @_crev_ https://speakerdeck.com/eunomie/mixit-2017-serverless