Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Scaling Mature Systems
© OPENJAW TECHNOLOGIES 20122
Teaching an
old dog new
tricks
© OPENJAW TECHNOLOGIES 20123
Change in environment
• Different usage or purpose
• Increase in products
• Increase in traff...
© OPENJAW TECHNOLOGIES 20124
Morten Jørgensen
Chief Architect
OpenJaw Technologies
Focus:
• Support product functionality
...
© OPENJAW TECHNOLOGIES 20125
System Load
ResourceConsumption
Scalability vs Performance
© OPENJAW TECHNOLOGIES 20126
• Distributed transactions
• Resource contention
• State/session management
• Deployment proc...
Distributed Transactions
© OPENJAW TECHNOLOGIES 20128
• ACID principle
• Pessimistic
• Slow
• BASE principle
• Optimistic
• Fast
ACID vs. BASE
© OPENJAW TECHNOLOGIES 20129
• Come at a cost:
• Latency
• Performance
• Scalability
• Availability
• Software “failure” m...
© OPENJAW TECHNOLOGIES 201210
Distributed Transactions
© OPENJAW TECHNOLOGIES 201211
• Reconfigure transaction management
• Implement failure detection
• Report or log failures
...
Resource Contention
© OPENJAW TECHNOLOGIES 201213
• Contention around internal and external systems
• Consumer experience limited by availabil...
© OPENJAW TECHNOLOGIES 201214
• Implement using SQL or no-SQL database
• Choose platform based on your needs
• Simple appr...
© OPENJAW TECHNOLOGIES 201215
• Trade-off between data quality and performance
• Measure cache hit-rate
• Measure data qua...
State & Session Management
© OPENJAW TECHNOLOGIES 201217
• Make your application stateless
• Remove session data from the application
• Increase in u...
© OPENJAW TECHNOLOGIES 201218
• Two options:
• Move to new platform
• Change existing platform
• J2EE conformance allowed ...
© OPENJAW TECHNOLOGIES 201219
Cassandra
KeySpace
Column Family
Key
Column
Schema
Table
Row
Column
SuperColumn
Column
Key
S...
© OPENJAW TECHNOLOGIES 201220
Cassandra Session Manager
Cassandra
“Ring”
StatelessLoadBalancer
Thrift
Application
Tomcat P...
© OPENJAW TECHNOLOGIES 201221
• Session object serialisation
• Session object synchronisation
• Network bandwidth
Cassandr...
Deployment Process
© OPENJAW TECHNOLOGIES 201223
• Your application is decoupled
• Your application is stateless
• You can add nodes when dem...
© OPENJAW TECHNOLOGIES 201224
• Remove everything but code!
• Extract session state
• Extract configuration
• Create a VM ...
© OPENJAW TECHNOLOGIES 201225
Deployment Process
VM VM VMVM
Stateless Load Balancer
Client
Admin
Console
Results
© OPENJAW TECHNOLOGIES 201227
• Product built over 10 years
• Large solution with high complexity
• Made Internet scalable...
Thank you!
Upcoming SlideShare
Loading in …5
×

Scaling mature systems

987 views

Published on

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

  • Be the first to like this

Scaling mature systems

  1. 1. Scaling Mature Systems
  2. 2. © OPENJAW TECHNOLOGIES 20122 Teaching an old dog new tricks
  3. 3. © OPENJAW TECHNOLOGIES 20123 Change in environment • Different usage or purpose • Increase in products • Increase in traffic
  4. 4. © OPENJAW TECHNOLOGIES 20124 Morten Jørgensen Chief Architect OpenJaw Technologies Focus: • Support product functionality • Operational efficiency • Scalability and fault tolerance
  5. 5. © OPENJAW TECHNOLOGIES 20125 System Load ResourceConsumption Scalability vs Performance
  6. 6. © OPENJAW TECHNOLOGIES 20126 • Distributed transactions • Resource contention • State/session management • Deployment process Common Scalability Blockers
  7. 7. Distributed Transactions
  8. 8. © OPENJAW TECHNOLOGIES 20128 • ACID principle • Pessimistic • Slow • BASE principle • Optimistic • Fast ACID vs. BASE
  9. 9. © OPENJAW TECHNOLOGIES 20129 • Come at a cost: • Latency • Performance • Scalability • Availability • Software “failure” may make business sense! Distributed Transactions
  10. 10. © OPENJAW TECHNOLOGIES 201210 Distributed Transactions
  11. 11. © OPENJAW TECHNOLOGIES 201211 • Reconfigure transaction management • Implement failure detection • Report or log failures • Implement failure handling processes • Convince business owner Distributed Transactions
  12. 12. Resource Contention
  13. 13. © OPENJAW TECHNOLOGIES 201213 • Contention around internal and external systems • Consumer experience limited by availability, performance and scalability of these systems • Break dependency by using asynchronous processes • Caching is the easiest form of asynchronous decoupling Resource Contention
  14. 14. © OPENJAW TECHNOLOGIES 201214 • Implement using SQL or no-SQL database • Choose platform based on your needs • Simple approach • Build cache key • Cache lookup • Cache storage Cache Implementation
  15. 15. © OPENJAW TECHNOLOGIES 201215 • Trade-off between data quality and performance • Measure cache hit-rate • Measure data quality • Tune cache according to both! Cache Tuning
  16. 16. State & Session Management
  17. 17. © OPENJAW TECHNOLOGIES 201217 • Make your application stateless • Remove session data from the application • Increase in user sessions will not impact single node • Add new nodes when traffic increases Stateless Applications
  18. 18. © OPENJAW TECHNOLOGIES 201218 • Two options: • Move to new platform • Change existing platform • J2EE conformance allowed us to use Tomcat • Tomcat allowed session manager plugin Stateless Applications
  19. 19. © OPENJAW TECHNOLOGIES 201219 Cassandra KeySpace Column Family Key Column Schema Table Row Column SuperColumn Column Key Session Manager Session ID Session Attribute Name Session Object Value
  20. 20. © OPENJAW TECHNOLOGIES 201220 Cassandra Session Manager Cassandra “Ring” StatelessLoadBalancer Thrift Application Tomcat PLUGIN Application Tomcat PLUGIN Application Tomcat PLUGIN
  21. 21. © OPENJAW TECHNOLOGIES 201221 • Session object serialisation • Session object synchronisation • Network bandwidth Cassandra Session Manager
  22. 22. Deployment Process
  23. 23. © OPENJAW TECHNOLOGIES 201223 • Your application is decoupled • Your application is stateless • You can add nodes when demand increases • How quickly can you bring a new node up? • Is your application an elastic resource? Deployment Process
  24. 24. © OPENJAW TECHNOLOGIES 201224 • Remove everything but code! • Extract session state • Extract configuration • Create a VM image as a template • Instantiate VMs from the image on demand Deployment Process
  25. 25. © OPENJAW TECHNOLOGIES 201225 Deployment Process VM VM VMVM Stateless Load Balancer Client Admin Console
  26. 26. Results
  27. 27. © OPENJAW TECHNOLOGIES 201227 • Product built over 10 years • Large solution with high complexity • Made Internet scalable with small amount of engineering resources • Ability to scale is now a key selling point Our Results
  28. 28. Thank you!

×