11
Daniel Cukier Department of Computer Science University of São Paulo [email protected] DevOps Patterns to Scale Web Applications using Cloud Services

DevOps Patterns to Scale Web Applications using Cloud Services

Embed Size (px)

DESCRIPTION

Scaling a web applications can be easy for simple CRUD software running when you use Platform as a Service Clouds (PaaS). But if you need to deploy a complex software, with many components and a lot users, you will need have a mix of cloud services in PaaS, SaaS and IaaS layers. You will also need knowledge in architecture patterns to make all these software components communicate accordingly. In this presentation, we share our experience of using cloud services to scale a web application. We show usage examples of load balancing, session sharing, e-mail delivery, asynchronous processing, logs processing, monitoring, continuous deployment, realtime user monitoring (RUM). These are a mixture of development and system operations (DevOps) that improved our application availability, scalability and performance.

Citation preview

Page 1: DevOps Patterns to Scale Web Applications using Cloud Services

Daniel Cukier Department of Computer Science

University of São Paulo !

[email protected]

DevOps Patterns to Scale Web Applications

using Cloud Services

Page 2: DevOps Patterns to Scale Web Applications using Cloud Services

!

96GB dedicated MySQL server

user stats

core data

photos

16GB dedicated server

sessions

search

login

backoffice

assets

cart

emails

coreimage processing

Page 3: DevOps Patterns to Scale Web Applications using Cloud Services

worker (n)

memcache (2)

sessions

Elo7 (3)

java server

http server

core

atelier (1)

backoffice

DynamoDB

user stats

S3

assets

photosimage processing

queue (1)

redis server

assyncjobs

Vitrine (2)

rails server

http server

vitrine

MySQL (2)

core data

vitrine data

Login (2)

java server

http server

login

Rest API (2)

rails server

http server

REST api

cart

search (3)

search API

search

solr (lucene)

staging env (3)

Page 4: DevOps Patterns to Scale Web Applications using Cloud Services

Store Big Files in Cloud Storages

Context: You have a web application that needs to deliver large files to users. These files can be doc-uments, photos, videos, or other binary formats. !

Solution: Serve large static data files using a cloud web storage !

Why: avoid BLOB columns, large files consume resources and disk, backup

Page 5: DevOps Patterns to Scale Web Applications using Cloud Services

Queue based solution to process async jobs

P c2

c1

c3

Context: Needs fast response to end user, have some time consuming tasks !

Solution: Use a queue based solution to process your background jobs. !

Why: Async threads can harm your application, auto-failover, monitoring, auto-scale

Page 6: DevOps Patterns to Scale Web Applications using Cloud Services

Load Balancing with memcached user sessions

Context: Complex web application, SLA 100%, user information in session, many deploys daily !

Solution: Use memcached session manager (MSM) software to store user session

Why: hot deploy does not work, availability, no session data loss, Tomcat solution does not scale

Page 7: DevOps Patterns to Scale Web Applications using Cloud Services

Cloud email delivery

Context: Lots of transactional emails. You need a guarantee that these emails are properly delivered !

Solution: Use cloud mail delivery services that provide easy-to-use REST API !

Why: cost, management, easy to program REST, spam, tracking

Page 8: DevOps Patterns to Scale Web Applications using Cloud Services

Cloud logging

Context: Complex web application, many logs, no access to production servers, needs log debugging !Solution: Use a cloud based log service to consolidate your application logs !

Why: manual copy, take care of disk space, indexing files demands work

Page 9: DevOps Patterns to Scale Web Applications using Cloud Services

Realtime User Monitoring (RUM)

Context: 1M users, many deploys per day, different user behaviors, complex infrastructure !

Solution: Use cloud mail delivery services that provide easy-to-use REST API !

Why: 100% test coverage do not guarantee it will not fail, staging different from production

Page 10: DevOps Patterns to Scale Web Applications using Cloud Services

Prefer PaaS over IaaS

When use PaaS When use IaaS

•Low knowledge about infrastructure

•No knowledge about scalability or security

•Do not want to monitor infrastructure

•Your application does not have have any specific technology

•Want to have more control of the infrastructure

•Infrastructure is core to your business

• You have software components that do not conform to PaaS providers standards

Page 11: DevOps Patterns to Scale Web Applications using Cloud Services

Daniel Cukier Department of Computer Science

University of São Paulo !

[email protected]

Thanks!