Download presentation
Presentation is loading. Please wait.
Published byGordon Wilkins Modified over 8 years ago
1
Building Scalable Web Infrastructures A study in digging clams By Adam Fletcher
2
You are an avid clam digger. http://www.foodmuseum.com/clams.html
3
You are also a computer nerd. http://www.foodmuseum.com/clams.html And Kelly Carmody on Photoshop You create a Web 2.0, AJAX, RSS, LAMP website for finding clamming beds and tracking clamming communities. You host it on your DSL line.
4
● Everyone uses your site to find the hottest beds ● Your DSL modem catches on fire ● Your “server” - a Pentium II – has the CPU eject from it's slot OMG! Clams are the next Internet! clamDiggr.com Two valves are more fun. You start a company with your web site.
5
You have to scale to meet demand... ● I can just buy more computers and bandwidth – What will the computers do? ● My application can handle a million clam diggers! – Prove it... but you know nothing about your application.
6
Your Application - clamDiggr! ● How Does clamDiggr.com Use Resources? – Most important! – Hardest data to get in some ways – What's the biggest abuser? ● How Can You Plan Ahead? – What are the trends in usage?
7
You Need Data ● OS, Web Server, App Server – No Problem – SNMP, iostat, vmstat, etc – Start trending now! ● DB Server – more complex – Explain plans – Statistics tables ● Your Application - Nothing!
8
What About Your Application? ● Profile your application under load – Each language has a profiler – Under load is key! – You'll learn what you need to be tracking ● Profile your DB usage – reads/writes ratio? – Deadlocks?
9
Build Metrics In ● Add A Metrics Interface To The Application – How many users on the system right now? – How many clam beds? – How much memory per clam bed in cache? – How many cache misses? ● Track Your Metrics – Cacti, cricket, RRDTool, another MySQL table
10
To Scale, You Must Architect ● What Do The Numbers Tell You? – What resources are you abusing? – How can you manage resources? – How should you divide the labor? ● Some basic ideas – Read-only databases – Many web servers behind load balancers – Distributed caches
11
Planning For The Future ● Clam growth projected to be up %400 – How will your server handle it? – How has it handled it in the past? ● What's your busy season? – Look at the trends! ● Profiling tells you what you need to grow to predictions
12
Summary – clamDiggr.com IPO! ● Know your application ● Track your data on all levels ● Don't be afraid to architect ● You don't have to do all this at once
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.