Mongo DB on Apache Stratos

Post on 08-Sep-2014

376 views 3 download

Tags:

description

 

transcript

What WSO2 delivers

About WSO2

About the Presenters

๏ Akila Perera - Software Engineer at WSO2 - Open Source enthusiast

๏ Dinesh Bandara - Software Engineer at WSO2 - Interested in distributed systems

๏ Isuru Haththotuwa - Senior Software Engineer at WSO2 - Interested in Electronics and Software technologies

Agenda

• Brief Introduction to Apache Stratos• DB as a Service - Challenges• Autoscaling - What is it and Why is it Important?• Autoscaling in Apache Stratos• Configuring Autoscaling with Policies• Demonstration of MongoDB Running on

Apache Stratos with Autoscaling• Q&A Session

Brief Introduction to Apache Stratos

๏ Apache Stratos is a highly-extensible Platform-as-a-Service (PaaS) framework.

๏ It helps to run your applications (Apache Tomcat, PHP, MySQL, etc.) on all major cloud infrastructures (EC2, OpenStack, vCloud. etc.)

Brief Introduction to Apache Stratos(cont'd)

๏ Stratos was initially developed by WSO2, and was donated to Apache Software Foundation last year

๏ After successfully completing the incubating process Stratos graduated as a Top Level Project

Main Features

๏ Open extensible architecture๏ Multi-factored auto scaling๏ Scalable and dynamic load balancing๏ Multi-tenancy๏ Multi cloud and cloud bursting๏ Logging, Metering and Monitoring

DB as a Service - Challenges

๏ Applications depend on DBs to store their states; very critical for real world applications

๏ If multiple nodes are used, replication should happen between nodes - harder if nodes are spun dynamically

๏ Data Persistence, in case of a node failure

Autoscaling

๏ On demand resource allocation in PaaS world

๏ System itself detects peaks in resource usage, spins up new instances to cater to the high demand

What is it?

Autoscaling (cont'd)

๏ Efficient in terms of cost, always use the optimum amount of resources

๏ Improves the HA characteristics, throughput, response time

๏ Major advantage of cloud computing - can spin up/terminate instances with an API call, no manual intervention required

Why is it Important?

‘Scale Up Early, Scale Down Slowly’

๏ A golden rule related to autoscaling๏ Scale up early - scale up when there are signs of a demand peak๏ Scale down slowly - make sure that the demand/load is

genuinely going down before scaling down

๏ Autoscaling algorithm should be able to take the relevant decision from the available data

Autoscaling in Apache Stratos

๏ Scaling up/down based on multiple factors

๏ Currently supports autoscaling based on amount of Requests in Flight or Load Average and Memory Consumption

Autoscaling in Apache Stratos (cont'd)

๏ Policy based - ability to configure/fine tune according to the deployed environment

๏ Extensible architecture supports pluggability of autoscaling implementations based on custom parameters

Configuring Autoscaling with Policies

๏ Configuration of autoscaling parameters (RIF/Load Average/Memory) according to your environment

๏ Deployed via a REST endpoint in Stratos Manager

Sample Autoscaling Policy:

{ "id": "simpleAutoscalePolicy",

"loadThresholds": { "requestsInFlight": { "average": "100" }, "memoryConsumption": { "average": "600" }, "loadAverage": { "average": "300" } }}

MongoDB on Apache Stratos

๏ MongoDB is a NoSQL document database system that scales well horizontally

๏ MongoDB handles replication through an implementation called "replication sets"

MongoDB on Apache Stratos (cont'd)

๏ By adding replicas your databases will be protected in some degree from unavailability and hardware failure.

๏ All replication mechanics are handled internally by Apache Stratos

MongoDB on Apache Stratos

MongoDB in Stratos consists of two cartridge types

๏ MongoDB load balancer (mongolb)๏ Config Server process๏ Mongos process๏ End point for applications

MongoDB on Apache Stratos(cont'd)

๏ MongoDB replica set (mongod)๏ Mongod process๏ Performs actual data storage operations

Demo

QUESTIONS?

Business Model