mongo db on apache stratos
DESCRIPTION
TRANSCRIPT
![Page 1: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/1.jpg)
![Page 2: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/2.jpg)
What WSO2 delivers
![Page 3: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/3.jpg)
About WSO2
![Page 4: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/4.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/5.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/6.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/7.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/8.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/9.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/10.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/11.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/12.jpg)
‘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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/13.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/14.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/15.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/16.jpg)
Sample Autoscaling Policy:
{ "id": "simpleAutoscalePolicy",
"loadThresholds": { "requestsInFlight": { "average": "100" }, "memoryConsumption": { "average": "600" }, "loadAverage": { "average": "300" } }}
![Page 17: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/17.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/18.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/19.jpg)
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](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/20.jpg)
MongoDB on Apache Stratos(cont'd)
๏ MongoDB replica set (mongod)๏ Mongod process๏ Performs actual data storage operations
![Page 21: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/21.jpg)
Demo
![Page 22: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/22.jpg)
QUESTIONS?
![Page 23: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/23.jpg)
![Page 24: Mongo DB on Apache Stratos](https://reader034.vdocuments.net/reader034/viewer/2022042515/540da3878d7f72767e8b4ae2/html5/thumbnails/24.jpg)
Business Model