building cloud native applications

Post on 12-Jan-2015

1.560 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presented at Cloud Developer Conference April 2013

TRANSCRIPT

1

By Munish K Gupta - @write2munish

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

3

What is Cloud Native Application?

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

5

Social Feed Application

6

Social Feed Application

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

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

9

Functional Model

User Registration

Session Management

User Preferences Search

Content Tagging

Recommendation Engine Feed Fetch

Responsive Web Design

10

Architecture Patterns

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

12

Loose Coupling

13

Polyglot Persistence

Redis

Neo4j

ApacheLucene

MapReduceMongodb

MySQL

MySQL

Mongodb

14

Fault Tolerance + Service Load Balancing

Load Balancing between multiple Service provider instances

Handling service provider instance failures

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

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!

17

Async Request processing

LESS -Responsive Web Design

Node.js for stateless and

async request

processing mode

18

Deployment Model

Distributed Scalable

Available

Stateless

ASync processi

ng

Event driven

Fault Tolerant

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

20

Munish K Gupta

write2munish (at) gmail.com

Twitter @write2munish

Blog(s) www.techspot.co.in

www.akkaessentials.in

top related