20
1 By Munish K Gupta - @write2munish Building Cloud Native Applications

Building Cloud Native Applications

Embed Size (px)

DESCRIPTION

Presented at Cloud Developer Conference April 2013

Citation preview

Page 1: Building Cloud Native Applications

1

By Munish K Gupta - @write2munish

Building Cloud Native Applications

Page 2: Building Cloud Native Applications

2

Munish K Gupta

• Current Avatar• Software Architect/Engineer –High

Performance Architecture (HiPA) group @ Wipro Technologies

• Author – Akka Essentials (Oct 2012)

• Work with lot of open source stuff – Play Framework, Akka, Scala, mongodb, redis, LAMP stack

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

Page 3: Building Cloud Native Applications

3

What is Cloud Native Application?

Page 4: Building Cloud Native Applications

4

Cloud Native Application

Services• All functionality is published and consumed via web

services

Handling Failures

• Every Integration point will eventually fail one time or another

• Be prepared to handle all kind of failures

Horizontal Scalability

• Design for Scale Out

Asynchronous Processing

• Break down the task, process requests asynchronously

• Use queues to decouple functionality• Eventual consistency model

Stateless Model• Build stateless services that can be scaled out and

load balanced

Minimize Human

Intervention• Go DevOps/NoOps

Page 5: Building Cloud Native Applications

5

Social Feed Application

Page 6: Building Cloud Native Applications

6

Social Feed Application

Page 7: Building Cloud Native Applications

7

Functional & Nonfunctional Requirements

• Functional Requirements• User registrations + Social Sites OAuth (FB, Twitter)• Allows users to insert/import RSS feeds• Feed data need to be categorized , auto tagged and searchable• Feed data can be bookmarked and shared across social channels• Feed recommendations based on social graph data• Feeds displayed to the user via series of templates (list, mosaic,

magazine style)• Supports mobile view of data• Site Analytics

• Nonfunctional Requirements• Supports 10,000 concurrent users• Supports initial user base of 500,000 users• Feed volumes of about 500 feeds/sec• Availability requirements (99.9% uptime)• Hosted on cloud and resilient to availability zone failures• CPU utilization should be minimum of 70% and application should be

cost optimized for cloud resources

Page 8: Building Cloud Native Applications

8

Functional Decomposition

User Registration + Session Management

• User registrations + Social Sites OAuth (FB, Twitter)

User Data• Allows users to insert/import RSS feedsFeed Fetch, Search, Content Tagging

• Feed data need to be categorized , auto tagged and searchable

User Preferences

• Feed data can be bookmarked and shared across social channels

Recommendation Engine

• Feed recommendations based on social graph data

• Site Analytics

Responsive Web Design

• Feeds displayed to the user via series of templates (list, mosaic, magazine style)

• Supports mobile view of data

Page 9: Building Cloud Native Applications

9

Functional Model

User Registration

Session Management

User Preferences Search

Content Tagging

Recommendation Engine Feed Fetch

Responsive Web Design

Page 10: Building Cloud Native Applications

10

Architecture Patterns

Page 11: Building Cloud Native Applications

11

Partition by Functionality

User

Reg

istr

ati

on

User

Pre

fere

nces

Searc

h

Con

ten

t Ta

gg

ing

Feed

Fetc

h

Recom

men

dati

on

En

gin

e

Session Management

Responsive Web Design

Page 12: Building Cloud Native Applications

12

Loose Coupling

Page 13: Building Cloud Native Applications

13

Polyglot Persistence

Redis

Neo4j

ApacheLucene

MapReduceMongodb

MySQL

MySQL

Mongodb

Page 14: Building Cloud Native Applications

14

Fault Tolerance + Service Load Balancing

Load Balancing between multiple Service provider instances

Handling service provider instance failures

Page 15: Building Cloud Native Applications

15

Fault Tolerance + Service Load Balancing

https://github.com/Netflix/eureka

Netflix Eureka Open Source Project

Picture fromhttps://github.com/Netflix/eureka/wiki/Eureka-at-a-glance

Page 16: Building Cloud Native Applications

16

Decoupling

User

Data

Searc

h

Con

ten

t D

ata

Recom

men

dati

on

En

gin

e

MySQL

Lucene

Mongodb Neo4j

Communication across functional columns

using messages - SQS

Web Services model can

also be used here!

Page 17: Building Cloud Native Applications

17

Async Request processing

LESS -Responsive Web Design

Node.js for stateless and

async request

processing mode

Page 18: Building Cloud Native Applications

18

Deployment Model

Distributed Scalable

Available

Stateless

ASync processi

ng

Event driven

Fault Tolerant

Page 19: Building Cloud Native Applications

19

Summary

• Design to decouple and partition application functionality

• Right tools to solve the right problem• Build for horizontal scalability – scale out• Design to handle all kinds of failures• Process asynchronously – event driven• Build stateless compute services• Minimize human intervention - DevOps/NoOps• Above all, do not forget continuous build and

deployment

Learned we may be with another man's learning: we can only be wise with wisdom of our own

Michel de Montaigne

Page 20: Building Cloud Native Applications

20

Munish K Gupta

write2munish (at) gmail.com

Twitter @write2munish

Blog(s) www.techspot.co.in

www.akkaessentials.in