Mongo DB on Apache Stratos


Published on

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Mongo DB on Apache Stratos

  1. 1. What WSO2 delivers
  2. 2. About WSO2
  3. 3. 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
  4. 4. 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
  5. 5. 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.)
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. 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?
  10. 10. 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?
  11. 11. ‘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
  12. 12. 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
  13. 13. 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
  14. 14. Configuring Autoscaling with Policies ๏ Configuration of autoscaling parameters (RIF/Load Average/Memory) according to your environment ๏ Deployed via a REST endpoint in Stratos Manager
  15. 15. Sample Autoscaling Policy: { "id": "simpleAutoscalePolicy", "loadThresholds": { "requestsInFlight": { "average": "100" }, "memoryConsumption": { "average": "600" }, "loadAverage": { "average": "300" } } }
  16. 16. MongoDB on Apache Stratos ๏ MongoDB is a NoSQL document database system that scales well horizontally ๏ MongoDB handles replication through an implementation called "replication sets"
  17. 17. 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
  18. 18. 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
  19. 19. MongoDB on Apache Stratos (cont'd) ๏ MongoDB replica set (mongod) ๏ Mongod process ๏ Performs actual data storage operations
  20. 20. Demo
  21. 21. QUESTIONS?
  22. 22. Business Model