13
1 Building Low Cost Scalable Web Applications - Tools & Techniques Ramesh Rajamani Compassites Software Solutions, Bangalore Barcamp, Hyderabad 16 th February 2008

Building Low Cost Scalable Web Applications Tools & Techniques

  • Upload
    rramesh

  • View
    3.447

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Building Low Cost Scalable Web Applications   Tools & Techniques

1

Building Low Cost Scalable Web Applications - Tools &

Techniques

Ramesh RajamaniCompassites Software Solutions, Bangalore

Barcamp, Hyderabad16th February 2008

Page 2: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 3: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 4: Building Low Cost Scalable Web Applications   Tools & Techniques

4

Points of Focus

• Performance

• Scaling

• Network

• Storage & Replication

Page 5: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 6: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 7: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 8: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 9: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 10: Building Low Cost Scalable Web Applications   Tools & Techniques

10

Logical Architecture

Page 11: Building Low Cost Scalable Web Applications   Tools & Techniques

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

Page 12: Building Low Cost Scalable Web Applications   Tools & Techniques

12

Q&A

Page 13: Building Low Cost Scalable Web Applications   Tools & Techniques

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