24

Mongo DB on Apache Stratos

  • Upload
    wso2

  • View
    384

  • Download
    3

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Mongo DB on Apache Stratos
Page 2: Mongo DB on Apache Stratos

What WSO2 delivers

Page 3: Mongo DB on Apache Stratos

About WSO2

Page 4: Mongo DB on Apache Stratos

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

Page 5: Mongo DB on Apache Stratos

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

Page 6: Mongo DB on Apache Stratos

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.)

Page 7: Mongo DB on Apache Stratos

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

Page 8: Mongo DB on Apache Stratos

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

Page 9: Mongo DB on Apache Stratos

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

Page 10: Mongo DB on Apache Stratos

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?

Page 11: Mongo DB on Apache Stratos

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?

Page 12: Mongo DB on Apache Stratos

‘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

Page 13: Mongo DB on Apache Stratos

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

Page 14: Mongo DB on Apache Stratos

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

Page 15: Mongo DB on Apache Stratos

Configuring Autoscaling with Policies

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

๏ Deployed via a REST endpoint in Stratos Manager

Page 16: Mongo DB on Apache Stratos

Sample Autoscaling Policy:

{ "id": "simpleAutoscalePolicy",

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

Page 17: Mongo DB on Apache Stratos

MongoDB on Apache Stratos

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

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

Page 18: Mongo DB on Apache Stratos

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

Page 19: Mongo DB on 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

Page 20: Mongo DB on Apache Stratos

MongoDB on Apache Stratos(cont'd)

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

Page 21: Mongo DB on Apache Stratos

Demo

Page 22: Mongo DB on Apache Stratos

QUESTIONS?

Page 23: Mongo DB on Apache Stratos
Page 24: Mongo DB on Apache Stratos

Business Model