4. 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
5. 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
6. 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.)
7. 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
8. 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
9. 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
10. 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?
11. 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?
12. ‘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
13. 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
14. 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
15. Configuring Autoscaling with
Policies
๏ Configuration of autoscaling parameters (RIF/Load
Average/Memory) according to your environment
๏ Deployed via a REST endpoint in Stratos Manager
17. MongoDB on Apache Stratos
๏ MongoDB is a NoSQL document database system that
scales well horizontally
๏ MongoDB handles replication through an
implementation called "replication sets"
18. 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
19. 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
20. MongoDB on Apache Stratos
(cont'd)
๏ MongoDB replica set (mongod)
๏ Mongod process
๏ Performs actual data storage operations