scale the cloud - skaluj chmurę
TRANSCRIPT
![Page 1: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/1.jpg)
Scale the CloudDaniel Bykowski
Loft16-01-2017
![Page 2: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/2.jpg)
About me
Daniel Bykowski
@KainosPolska 02/05/2023 2
Solution Architect
![Page 3: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/3.jpg)
Why to scale?
@KainosPolska 02/05/2023 3
![Page 4: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/4.jpg)
One server
![Page 5: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/5.jpg)
One application one server
• DNS• Public IP• Just one server instance
– Application– Database– File Storage– ...
@KainosPolska 02/05/2023 5
![Page 6: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/6.jpg)
Scaling up
• It’s simple, it’s easy• High CPU • High memory• High storage• High I/O
• Limited• Require outage
@KainosPolska 02/05/2023 6
![Page 7: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/7.jpg)
One application one server
• We can achieve a lot with scaling up
• Perfect for development environment
• No failover• No redundancy• All in one machine
@KainosPolska 02/05/2023 7
![Page 8: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/8.jpg)
Database
![Page 9: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/9.jpg)
Divide and conquer
• Separate DB instance• No code changes• Scale up application and DB
separately
@KainosPolska 02/05/2023 9
![Page 10: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/10.jpg)
Database as a Service
• Multi AZ – fault tolerant• Scale up in runtime without
break• Horizontal scaling – replication• Monitoring• Management• Backups• Continuous backups
RDS
@KainosPolska 02/05/2023 10
![Page 11: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/11.jpg)
Scaling web application
![Page 12: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/12.jpg)
Load Balancing
• Highly available• Session stickiness• Health checks• Security • HTTPS/HTTP• Monitoring• Logging
Elastic Load Balancer
@KainosPolska 02/05/2023 12
![Page 13: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/13.jpg)
Horizontal Scaling
• Automatic resize of compute cluster• Management and monitoring• Fault tolerant
• Limitations– Number on machines in subnet– DB connection limit
Auto Scaling Group
@KainosPolska 02/05/2023 13
![Page 14: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/14.jpg)
Auto Scaling
• Scheduled • Replace unhealthy instances• Alerts• Save money - Spot Instance
• Metrics
Auto Scaling Group
02/05/2023 14@KainosPolska
![Page 15: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/15.jpg)
Scaling background application
![Page 16: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/16.jpg)
Workers
• Scale out – easy– add new instance
• Scale in – hard– long runnig jobs– delayed termination– AWS Metrics is not
enough
@KainosPolska 02/05/2023 16
![Page 17: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/17.jpg)
Workers
• Scaling script – AWS API• Predict load
• Lambda
@KainosPolska 02/05/2023 17
![Page 18: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/18.jpg)
What else we can scale?
![Page 19: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/19.jpg)
Services
ElastiCache – distributed cache
S3 – object storage
SES – email service
Cloud Watch – metrics & logs
Elasticsearch - logs
CloudFront – Content Delivery Network@KainosPolska 02/05/2023 19
![Page 20: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/20.jpg)
Why to scale?
Keep your users happpy ...... for lowest possible
costs!
@KainosPolska 02/05/2023 20
![Page 21: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/21.jpg)
Questions?
![Page 22: Scale the Cloud - Skaluj chmurę](https://reader035.vdocuments.site/reader035/viewer/2022070520/58f08f291a28ab91428b45f3/html5/thumbnails/22.jpg)