stuff i do
play

Stuff I do Follow me! https://pasztor.at @janoszen About this - PowerPoint PPT Presentation

Stuff I do Follow me! https://pasztor.at @janoszen About this talk 1. The problem with CDNs About this talk 1. The problem with CDNs 2. How does a CDN work? About this talk 1. The problem with CDNs 2. How does a CDN work? 3. Static


  1. Stuff I do

  2. Follow me! https://pasztor.at @janoszen

  3. About this talk 1. The problem with CDNs

  4. About this talk 1. The problem with CDNs 2. How does a CDN work?

  5. About this talk 1. The problem with CDNs 2. How does a CDN work? 3. Static content CDN

  6. About this talk 1. The problem with CDNs 2. How does a CDN work? 3. Static content CDN 4. Hosting dynamic content

  7. Assumptions You know what HTTP is.

  8. Assumptions You know what HTTP is. You know what a DNS is.

  9. Assumptions You know what HTTP is. You know what a DNS is. You know what a CDN is.

  10. Warning! Don’t do this at home! This is as experimental as it gets.

  11. The problem with CDNs Low-traffic sites don’t work well with a CDN

  12. The problem with CDNs

  13. The problem with CDNs

  14. The problem with CDNs

  15. The problem with CDNs

  16. The problem with CDNs

  17. The problem with CDNs

  18. The problem with CDNs

  19. The problem with CDNs

  20. The problem with CDNs

  21. The problem with CDNs Cache User CDN Origin GET /avatar.jpg

  22. The problem with CDNs Cache User CDN Origin GET /avatar.jpg

  23. The problem with CDNs Cache User CDN Origin GET /avatar.jpg GET /avatar.jpg

  24. The problem with CDNs Cache User CDN Origin GET /avatar.jpg GET /avatar.jpg

  25. The problem with CDNs Cache User CDN Origin GET /avatar.jpg GET /avatar.jpg

  26. The problem with CDNs Cache User CDN Origin GET /avatar.jpg

  27. The problem with CDNs Cache User CDN Origin ~30-40 ms ~160 ms

  28. The problem with CDNs Cache User CDN Origin ~30-40 ms ~160 ms ~30-40 ms ~10 ms

  29. The problem with CDNs Cache User CDN Origin ~160 ms ~30-40 ms ~160 ms ~30-40 ms ~10 ms

  30. The problem with CDNs Cache User CDN Origin ~160 ms ~160 ms ~30-40 ms ~160 ms ~200 ms ~30-40 ms ~10 ms ~50 ms

  31. The problem with CDNs Workaround:

  32. The problem with CDNs Workaround: Cache-Control: s-maxage=31536000

  33. The problem with CDNs Caveat: All files must have unique URLs! Does not always work.

  34. How do CDNs work? Locating the proper edge node

  35. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  36. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  37. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  38. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  39. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  40. How do CDNs work? CDN POP in Europe CDN POP in the USA User

  41. How do CDNs work? CDN POP in Europe CDN POP in the USA I have 1.2.3.4! User

  42. How do CDNs work? CDN POP in Europe CDN POP in the USA I have 1.2.3.4! User

  43. How do CDNs work? CDN POP in Europe CDN POP in the USA I have 1.2.3.4! User

  44. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 User

  45. How do CDNs work? CDN POP in Europe CDN POP in the USA I have 1.2.3.4! 1.2.3.4 User

  46. How do CDNs work? CDN POP in Europe CDN POP in the USA I have 1.2.3.4! 1.2.3.4 User

  47. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 I have 1.2.3.4! User

  48. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 User I have 1.2.3.4!

  49. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 User I have 1.2.3.4!

  50. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 User I have 1.2.3.4!

  51. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 User 1.2.3.4

  52. How do CDNs work? CDN POP in Europe CDN POP in the USA 3 hops 1.2.3.4 User 1.2.3.4 6 hops

  53. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 1.2.3.4 User

  54. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 1.2.3.4 10.1.0.1 10.2.0.1 User

  55. How do CDNs work? CDN POP in Europe CDN POP in the USA 1.2.3.4 1.2.3.4 10.1.0.1 10.2.0.1 What is the IP for pasztor.at? User

  56. How do CDNs work? CDN POP in Europe CDN POP in the USA 10.1.0.1 1.2.3.4 1.2.3.4 10.1.0.1 10.2.0.1 User

  57. How do CDNs work? CDN POP in Europe CDN POP in the USA Anycast is ONLY used for DNS lookups! User See https://engineering.linkedin.com/network-performance/tcp-over-ip-anycast-pipe-dream-or-reality

  58. Hosting static content Part 1: Finding a DNS provider

  59. Hosting static content Anycast servers

  60. Hosting static content Anycast servers Latency- or GeoIP based responses

  61. Hosting static content ✓ Anycast servers ✓ Latency- or GeoIP based responses

  62. Hosting static content eu-central-1.glb.techblog.cloud. IN A 18.194.241.96 us-east-1.glb.techblog.cloud. IN A 54.152.113.29 us-west-1.glb.techblog.cloud. IN A 52.9.244.13

  63. Hosting static content eu-central-1.glb.techblog.cloud. IN A 18.194.241.96 us-east-1.glb.techblog.cloud. IN A 54.152.113.29 us-west-1.glb.techblog.cloud. IN A 52.9.244.13 glb.techblog.cloud. IN ALIAS eu-central-1.glb.techblog.cloud. glb.techblog.cloud. IN ALIAS us-east-1.glb.techblog.cloud. glb.techblog.cloud. IN ALIAS us-west-1.glb.techblog.cloud.

  64. Hosting static content

  65. Hosting static content Part 2: Docker

  66. Hosting static content us-west-1 us-east-1 eu-central-1 EC2 instance My laptop EC2 instance EC2 instance

  67. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECS ECS ECS AGENT AGENT AGENT EC2 instance My laptop EC2 instance EC2 instance

  68. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  69. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  70. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR Webserver Content ECS WEB ECS WEB ECS WEB Docker Image AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  71. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB Docker Image AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  72. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB Docker Image AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  73. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  74. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  75. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  76. Hosting static content us-west-1 us-east-1 eu-central-1 ECS ECS ECS ECR ECS WEB ECS WEB ECS WEB AGENT SERVER AGENT SERVER AGENT SERVER EC2 instance My laptop EC2 instance EC2 instance

  77. Hosting dynamic content Can it run Wordpress?

  78. Hosting dynamic content us-west-1 us-east-1 eu-central-1 EC2 instance EC2 instance EC2 instance

  79. Hosting dynamic content INTERNET us-west-1 us-east-1 eu-central-1 EC2 instance EC2 instance EC2 instance

  80. Hosting dynamic content INTERNET us-west-1 us-east-1 eu-central-1 Docker Swarm Overlay Network EC2 instance EC2 instance EC2 instance

  81. Hosting dynamic content INTERNET us-west-1 us-east-1 eu-central-1 WEB WEB WEB SERVER SERVER SERVER EC2 instance EC2 instance EC2 instance

  82. Hosting dynamic content INTERNET us-west-1 us-east-1 eu-central-1 WEB WEB WEB GALERA GALERA GALERA SERVER SERVER SERVER EC2 instance EC2 instance EC2 instance

  83. Hosting dynamic content

  84. Hosting dynamic content Unsolved issues:

  85. Hosting dynamic content Unsolved issues: Distributing Static Content

  86. Hosting dynamic content Unsolved issues: Distributing Static Content Downtime-less Updates

  87. Hosting dynamic content Unsolved issues: Distributing Static Content Downtime-less Updates Monitoring

  88. Summary Is it worth it?

  89. Summary

  90. Summary

  91. Summary

  92. Summary

  93. Summary Probably not.

  94. Summary Questions? Many thanks to Bence Sántha, Dan Radenković, Gábor Vereb, János Angeli, Krisztián Papp for their inspiration and feedback.

Recommend


More recommend