Upload
rramesh
View
3.447
Download
0
Embed Size (px)
Citation preview
1
Building Low Cost Scalable Web Applications - Tools &
Techniques
Ramesh RajamaniCompassites Software Solutions, Bangalore
Barcamp, Hyderabad16th February 2008
2
Needs
• Scale seamlessly– High Performance– Unlimited storage expansion– Reduce Network Latency
• Direct the user to nearest server
• Scale out, no Scale in
• Sweet spot: Low Cost, High Performance, Scaleable
3
First & Foremost
• Operating System makes a difference• Go for a *nix based operating system for your
production environment• Why?
– Stability– Low Cost of Ownership– Better security and resource management– Better control– Support for languages, tools, frameworks etc.– Exception - .Net
4
Points of Focus
• Performance
• Scaling
• Network
• Storage & Replication
5
Performance• Identify areas of bottlenecks• Example - Huge database reads
– Cache repeated reads
• Memory Clustering– Use MemCached
• High-performance, distributed memory object caching system
– Replicated Hash Table• Powerful high performance state replication
– Java/J2EE - Terracota• Virtual Heap• POJO clustering
6
Performance (2)
• Example 2 - Lot of uploads and downloads– You can build a low cost grid computing– A simple set of scripts and webservices can do the
magic• Reference IBM article
– Amazon Web Services - EC2 and S3 if you want to save some time
• Database Clustering– C-JDBC – Database clustering and replication
solution for Java/J2EE Apps
7
Scaling• Look for easy and quick scaling• Customers will be happy if you suggest a low
cost solution• Scale Out Vs Scale In
– Build a farm of low cost servers
• Amazon Web Services– EC2
• Elastic Computing• Quickly add/remove instances via web service calls• Pay for processor/networking per hour
8
Reduce Latency
• Global user access?• Route the user to the nearest data center• Solution - Content Delivery Network (CDN)
– Globule - CDN module for Apache
• Low cost solution providers are available• Work step by step• Key challenge - Replication of information across servers• Domain Name mapping across servers
– Dynamic Domain Mapping• EasyDNS• EZ-IPUpdate
9
Storage and Replication• Amazon
– Simple Storage Service (S3)• Unlimited storage• Transparent Grid computing• Not just for file storage but for database as well
• Replication– Database
• Daffodil Replicator• SymmetricDS
– Document Management• Thrudb – Built on top of Facebook’s Thrift framework
• Scaleable Messaging– Spread - Reliable and scalable messaging and group
communication
10
Logical Architecture
11
Roadblocks• Lot of work
– R&D– Proof of Concepts
• Integration Issues• Multiple point of failures• Day 1 won't be a perfect world
– Learn and improvise• Mitigation
– Be visionary– Get the business vision– Start working early on– Risk Management
• Bottlenecks• Point of failures• Sizing and Capacity Planning
12
Q&A
13
About
• Blog - TechMasala - http://www.techmasala.com• Co-founder and Architect, Compassites Software Solutions,
Bangalore - http://www.compassites.net• Co-Author - Java Servlet Programming Bible - John Wiley - 2002