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.

EEDC 2010. Scaling SaaS Applications

Seminario realizado en el marco del master CANS en la Facultad de Informática de Barcelona.
¿Qué es SaaS?
Un ERP en la "Nube"
Procesamiento batch

  • Be the first to comment

EEDC 2010. Scaling SaaS Applications

  1. 1. 6.1. SaaS<br />34330<br />EEDC<br />Execution<br />Environments for <br />Distributed <br />Computing<br />6.1.1. What’s SaaS<br />6.1.2. Multi-Tenancy<br />6.1.3. Batch processing<br />Master in Computer Architecture, Networks and Systems - CANS<br />
  2. 2. 6.1. SaaS<br />34330<br />EEDC<br />Execution<br />Environments for <br />Distributed <br />Computing<br />6.1.1. What’s SaaS<br />6.1.2. Multi-Tenancy?<br />6.1.3. Batch processing<br />Master in Computer Architecture, Networks and Systems - CANS<br />
  3. 3. What’s Software as a Service?<br />
  4. 4. WhySaaS?. On PremisesCashFlow<br />Crisis!<br />Customization & Deploy<br />New project<br />
  5. 5. Título de la presentación<br />WhySaaS?. SaaSCashFlow<br />Crisis!<br />New customer<br />Actual customers<br />
  6. 6. 6.1. SaaS<br />34330<br />EEDC<br />Execution<br />Environments for <br />Distributed <br />Computing<br />6.1.1. What’s SaaS<br />6.1.2. Multi-Tenancy?<br />6.1.3. Batch processing<br />Master in Computer Architecture, Networks and Systems - CANS<br />
  7. 7. What’s Multi-Tenancy?<br />You DON’T have a 1:1 relationbetweencustomers and instances of data<br />
  8. 8. SaaS ERP<br />Multi-Tenancy @ Spain targeting non-technological SMB (PyMEs)?<br />NO way!<br />Cultural issues were (and are) impacting their bottom-line and single-tenancy at database allows them to send backups of data to their customers as a «peace of mind»<br />They faced a trade-off between less scalability and bigger infrastructure costs, and selling to THEIR customers and easier development<br />
  9. 9. SaaS ERP<br />1st boxed software, on premises deploy & customization, remote upgrades, support, etc..<br />2nd Dual offering, boxed to big/special customers and SaaS using the same code base to smaller customers -> saving on support and upgrades<br />3rd Re-engineering of code to allow better concurrency. Developing their own RDP load balancer and a runtime to improve developing software (Visual Basic to C#.Net)<br />
  10. 10. SaaS ERP: Re-engineering<br />Problems:<br />Low concurrency level<br />One user could affect all user on this server<br />Peaks at month end (billing, payroll,…)<br />Printing<br />Licenses cost (Citrix, Terminal Server, Windows, SQL Server)<br />
  11. 11. SaaS ERP: Re-engineering<br />Solutions:<br />3 tier model (client, application server, database)<br />Client only renders, all calculations at server side<br />Same client and application server for all customers<br />Most reports go to printer so speed isn’t important, let’s shape the demand<br />Leverage asynchronous calls between client and server<br />Found tool to get rid of those printer drivers at the Terminal server<br />Developed a tool with instrumentation to substitute Citrix licenses<br />Has to be single-tenant at database side<br />
  12. 12. SaaS ERP: Single-Tenant<br />Single-Tenant at databaselevel<br />
  13. 13. 6.1. SaaS<br />34330<br />EEDC<br />Execution<br />Environments for <br />Distributed <br />Computing<br />6.1.1. What’s SaaS<br />6.1.2. Multi-Tenancy?<br />6.1.3. Batch processing<br />Master in Computer Architecture, Networks and Systems - CANS<br />
  14. 14. Batch processing only for Research?<br />What’s Batch processing?<br />Wait to have a bunch of things to process<br />Launch process to do things that last some time<br />Get the results after non trivial time<br />Why Batch processing?<br />Better Throughput at Latency expenses<br />
  15. 15. Batch processing only for Research?<br />What’s Batch processing?<br />Wait to have a bunch of things to process<br />Launch process to do things that last some time<br />Get the results after non trivial time<br />Why Batch processing?<br />Better Throughput at Latency expenses<br />
  16. 16. Sending newsletters<br />What a newsletter app looks like?<br />
  17. 17. Batch vs. Online<br />Where we don’t need hard real-time<br />
  18. 18. Batch optimization<br />If we wait enough…<br />We’ll have enough e-mails to same server to leverage<br />SMTP Pipelining<br />TCP Slow Start. Typical email 30 KB, BW 100 mb/s = 2 ms/email, but RTT 200 ms<br />
  19. 19. Batch optimization<br />If we wait enough…<br />We’ll have other problems<br />File System, too many files at the same folder<br />Time to read/create file O(n) on most file systems<br />Spool has to be persistent so we have to much write IOPS<br />Leverage hashing again<br />Hash files to folders so: 12132324.queue -> ab/c3/12132324.queue<br />Enable write back cache at the storage device<br />
  20. 20. Batch optimization<br />If we wait enough…<br />Went from 5.000 emails/hour <br />to 500.000 emails/hour<br />And save money as senders only need to be up when they are doing something (API to IaaS provider)<br />
  21. 21. Reporting optimization<br />Every click or image went to an Apache Server<br />Look for URL to redirect<br />Insert to access MySQL<br />Reporting using real-time aggregation queries<br />
  22. 22. Reporting optimization<br />Using a CDN + log parsing + Hive + Hbase we can escalate reporting<br />As the CDN doesn’t cache HTTP redirects we enable a poll based server sending redirects and logging the access<br />Urls looks like: http://esp.net/customer_id/link_id/mail_id<br />Also is easy to escalate with a simple load balancer<br />
  23. 23. Aboutthissession<br />34330 Execution Environments for Distributed Computing (EEDC), Master in Computer Architecture, Networks and Systems (CANS) Computer Architectura Department (AC)<br />UniversitatPolitècnica de Catalunya – Barcelona Tech (UPC)<br />INSTRUCTOR<br />Sergi Morales, Founder & CTO of Expertos en TIPhone: +34 6688-XPNTIEmail : sergi.morales+eedc@expertosenti.comBlog : http://blog.expertosenti.com<br /> Web: http://www.expertosenti.com<br />
  24. 24. About the EEDC course <br />34330 Execution Environments for Distributed Computing (EEDC), Master in Computer Architecture, Networks and Systems (CANS) Computer Architectura Department (AC)<br /> Universitat Politècnica de Catalunya – Barcelona Tech (UPC) ECTS credits: 6<br />INSTRUCTOR<br /> Professor Jordi TorresPhone: +34 93 401 7223 Email : torres@ac.upc.eduOffice : Campus Nord, Modul C6. Room 217.<br /> Web: http://www.JordiTorres.org<br />
  25. 25. 34330<br />EEDC<br />Execution<br />Environments for <br />Distributed <br />Computing<br />Sergi Morales<br />Founder & CTO<br />T: 668897684<br />E: sergi.morales@expertosenti.com<br />L: www.linkedin.com/in/sergimorales<br />Master in Computer Architecture, Networks and Systems - CANS<br />
  26. 26. Case<br />Asynchronous access to Facebook API server<br />Expect to fail<br />Tables with so many rows, a key/value approach<br />Consistent hashing to loadbalance data<br />Sticky servers?<br />

×