Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

14
1 Munish K Gupta Developing Scalable Apps for deploying on IaaS Cloud

description

 

Transcript of Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

Page 1: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

1

Munish K Gupta

Developing Scalable Apps for deploying on IaaS Cloud

Page 2: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

2

Who am I?

• Current Avatar• Practice Lead – Architecture for High Performance Applications

(AHiPA) @ Wipro Technologies• Work with lot of open source stuff – Play Framework, Akka,

Scala, mongodb, redis, LAMP stack

• Previous Avatar• Chief Architect for ideaken.com • Worked @ Wipro, Sapient, MindTree and Siemens

• My Blogs• http://www.techspot.co.in• http://www.akkaessentails.in

Page 3: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

3

Expectation(s)

• This session will not solve your problems !

• My goals are• To make you think harder about your problems• Help you evaluate possible solutions

• Agenda• Patterns that help improve Scalability of Application• Best Practices when building scalable applications

Page 4: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

4

High Performance Applications – Impact Factors

Application requirements

Reduce Latency

ScalabilityHigh Availability

• Topology of the Solution

• Single Point of Failure(s)

• Chosen Product Stack

• Integration Strategy

Solution Architecture

• Application Design• Choice of

Frameworks• Standards

Enforcement• Build & Release

Application Architecture

• Hardware Choices made

• Hardware/Software Sizing

• System Configuration(s)

• Hosting Environment• Application/System

Monitoring• Capacity Planning

Deployment Architecture

Page 5: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

5

What is Scalability?

Scalability means ability of an application to handle growing amount of data and concurrency in an efficient manner without impacting performance.

Page 6: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

6

Darshini Model

• Stateful• Synchronous• No Load

Balancing• No failover

Page 7: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

7

• Load Balanced• Stateless• Asynchronous • Event Driven /

Message based• Partition by

function

McDonald’s Model

Page 8: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

8

Go Stateless!

• State == Sessions !

Local Sessions

Centralized Session

No Sessions

Page 9: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

9

Load Balancing

Adding more web server and application servers

Load Balanced the DB Servers with active sync

Load Balanced the DB Servers using Master-Slave replications mode

Amazon RDS

or SQL Azure

options

Page 10: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

10

Go Asynchronous !

• Break down the request into parts – Go all the way !

• Isolate those that can be executed in non blocking mode (asynchronously)

• Queue the information needed to complete the Task (messages)

• Process the queues on the background thread (non blocking)

Event Driven Architecture

Page 11: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

11

Best Practices

• Partition by Function - Shard/Segment your Application.. Spread Out !

• Think Horizontal, Not Vertical • Scale Out• Use commodity equipment• Hardware and Memory is cheap - Add plenty of RAM and use 64bit

hardware

• Design application with failure in mind• Use caching wherever possible !• Bring homogeneity in your application

• Do not have too many moving parts• Think Simplicity

• Define the QoS for your application

Page 12: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

12

Best Practices

• Continuous Application Monitoring• Test your ability to scale !• Do not underestimate the importance of Processes & related

documentation• Configuration Management• Release Management• Change Management• Source Control• Issue Tracking• Coding Standards

• Minimize human intervention • Learn from Others !

Page 13: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

13

Summary

• What is Scalability?• Factors that impact Application Scalability• Darshini vs McDonald Model• Scalability Patterns and Best Practices

You can read all the books in the world about riding a bicycle, but you will not be able to ride one until you

get on it and fall off a few times.

Page 14: Developing Scalable Apps for deploying on IaaS Cloud CDC April 2012

14

Munish K Gupta

write2munish (at) gmail dot com

Twitter @write2munish

Blog(s) www.techspot.co.in

www.akkaessentials.in