There is a lot of information online about every imaginable scaling technique.Rails Lab, sponsored by New Relic, has videos on some of the most relevant issues facing Rails applications in generalBut what about you? What about your app? Which of these are important to you for this holiday season?
Others include monitoring site performance across the globe (selecting vendors, not happy with current alternatives)Once you understand how your application is behaving, and you can measure every aspect of your system and your business, you area ready to begin.
Talk about our recent performance fix, CEO now asks how our APDEX score is doing… business thinks about sales increases since specific optimizations went live, etc.
Optimizing Your Online Store for the Holidays
Optimizingyour Online Storefor the Holidays<br />Brian Doll, SheetMusicPlus.com<br />Mike Malloy, New Relic<br />
Agenda<br />Why application performance is important?<br />What’s at stake?<br />About SheetMusicPlus.com<br />Tips for optimizing your online store<br />Special “Get Ready for the Holidays” Promotion<br />
Why Application Performance is Important to Your Business<br />30% of online shoppers abandon slow or unreliable sites<br />In 2008 holiday season, 36% of users encountered web performance problems that led to abandonment<br />Specific problems encountered<br />Application slow while shopping<br />Application froze/crashed<br />Unable to make a purchase at first attempt<br />Website down/unavailable<br />Apparent successful transaction failed to complete<br />
What’s at Stake?<br />$50 Billion a year is lost in cart abandonment<br />48% will go to purchase from another online source<br />79% are less likely to visit the site again<br />44% of affected customers tell others about their poor experience<br />46% form a negative impression of the company<br />
SheetMusicPlus.com<br />Largest source for sheet music, instructional materials, and song books in the world.<br />
SMP: Quick Stats<br />12 year old online business<br />Shipping to 170+ countries<br />Over 600k SKUs, 1.5M songs<br />All hosts are virtualized with VMWare<br />Citrix Netscaler<br />14 Rails application servers (Apache + Passenger)<br />5 memcached servers<br />3 Solr servers (search, faceted navigation)<br />3 MySQL servers<br />
Analyze your architecture<br />What systems are involved in…<br />displaying a product detail page<br />your checkout process<br />searching your catalog<br />registering as a new user<br />How does your application respond to failure of any of your system connections?<br />search servers offline<br />payment gateway unresponsive<br />email server overloaded<br />DNS lookup failures<br />
Analyze your business<br />How do new and returning customers use your application?<br />What is your ratio of new and returning customers?<br />How might holiday traffic impact that ratio?<br />How might an increase in sales negatively impact the customer experience?<br />How fresh is your inventory online?<br />How might order status information be affected?<br />What is the average response time for your call center?<br />
Metrics for everything<br />New Relic RPM<br />Application performance, systems metrics, custom metrics with dashboards<br />New Relic RPM for Java (Solr search servers)<br />Memory profiling, garbage collection, throughput, performance<br />MySQL Enterprise Monitor<br />MySQL performance, slow queries, explain, replication delay, configuration<br />Cacti (based on RRDtool)<br />Host servers, VMs, Memcached stats, network, anything you can think of<br />Google Analytics<br />Customer behavior, on-site search, conversion, other business metrics<br />
Now you can optimize<br />Identify a specific pain point<br />Ensure you have verifiable metrics<br />Deploy an initial optimization effort<br />Measure the effects. Are you on the right path?<br />Deploy the “final” optimization<br />Document your optimization timeline<br />Profit! Demonstrate the business value of your optimizations<br />Repeat<br />
Simple Optimizations<br />Implement the circuit breaker pattern<br />Don’t let system failures bring you down! (from Release It! By Michael Nygard)<br />http://github.com/wsargent/circuit_breaker<br />Cache page fragments for set periods of time<br />For dynamic content that can be “stale” for some definable period of time<br />http://github.com/rlivsey/timed_fragment_cache/<br />Content Delivery Network<br />Essential for international customers; requires coordination with deploys<br />Memcached<br />Set up memcached and you’ll find more ways to use it every day<br />New Relic RPM<br />I would not run a Rails app in production without it<br />
Embrace Change<br />No code freeze!<br />Take advantage of this increase in customer demand<br />Implement new business strategies to adapt to changing demographics<br />Focus on your ability to release change quickly<br />Strive to release to production as frequently as your business can handle<br />Ensure your releases are automated and repeatable<br />Understand how your system behaves during a release<br />Releases should be low ceremony, as a testament to how rigorous your software testing andbusiness approval processes are<br />Add capacity on-demand<br />How fast can you get a new app instance online and handling requests?<br />Engine Yard Flex is an excellent model for how we should be thinking about our infrastructure, software dependencies and release processes<br />
Get Ready for the Holidays Promotion<br />New customers: any account opened before October 15 will get 25% off<br />Current customers: Any upgrade – additional hosts or higher level of RPM service before October 15 gets 25% off<br />Enter Promo Code: NR-HOHOHO<br />