The Definition Of Crazy Insanity Chris Porter D.O netw3rker

Slides:



Advertisements
Similar presentations
1 Perspectives from Operating a Large Scale Website Dennis Lee VP Technical Operations, Marchex.
Advertisements

JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Case Study: Photo.net March 20, What is photo.net? An online learning community for amateur and professional photographers 90,000 registered users.
© 2012 Entrinsik, Inc. Informer Administration Exploring the system menu and functions PRESENTER: Jason Vorenkamp| Informer Software Engineer| March 2012.
CHAPTER 15 WEBPAGE OPTIMIZATION. LEARNING OBJECTIVES How to test your web-page performance How browser and server interactions impact performance What.
Amazon CloudFront An introductory discussion. What is Amazon CloudFront? 5/31/20122© e-Zest Solutions Ltd. Amazon CloudFront is a web service for content.
Startup Technology Pitfalls and How to Avoid them.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
Flash Crowds And Denial of Service Attacks: Characterization and Implications for CDNs and Web Sites Aaron Beach Cs395 network security.
Anycast Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm.
Analysis and Performance Information Systems 337 Prof. Harry Plantinga.
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
Web Caching and CDNs March 3, Content Distribution Motivation –Network path from server to client is slow/congested –Web server is overloaded Web.
Caching and Content Distribution Networks. Web Caching r As an example, we use the web to illustrate caching and other related issues browser Web Proxy.
Web Cache. Introduction what is web cache?  Introducing proxy servers at certain points in the network that serve in caching Web documents for faster.
The easy way to a nice looking website design By a total non-designer (Me!)
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 21: Publishing Your Pages on the Web.
Google AppEngine. Google App Engine enables you to build and host web apps on the same systems that power Google applications. App Engine offers fast.
Mark Phillip markphillip.com 200s, 304s, Expires Headers, HTTP Compression, And You.
1 Content Distribution Networks. 2 Replication Issues Request distribution: how to transparently distribute requests for content among replication servers.
On the Use and Performance of Content Distribution Networks Balachander Krishnamurthy Craig Wills Yin Zhang Presenter: Wei Zhang CSE Department of Lehigh.
1 Caching  Temporary storage of frequently accessed data (duplicating original data stored somewhere else)  Reduces access time/latency for clients 
22-Aug-15 | 1 |1 | Help! I need more servers! What do I do? Scaling a PHP application.
Using Drupal to Build Applications Chris Porter Acquia, Inc. August 21,
Lecture 18 Page 1 CS 111 Online Design Principles for Secure Systems Economy Complete mediation Open design Separation of privileges Least privilege Least.
Designing Enterprise Drupal How to scale Drupal server infrastructure ENVIRONMENTS.
E-Commerce Technical Aspects Tzahi Fridman
Making your website go faster! Front-end Developer, Deeson Online Alli Price.
Global NetWatch Copyright © 2003 Global NetWatch, Inc. Factors Affecting Web Performance Getting Maximum Performance Out Of Your Web Server.
Making it easier to develop, deploy and maintain Drupal web sites Name, Title Date.
Implementation - Deployment Methods of deployment –User PC –Network shared (workstation install) –Terminal server –Web Deployment (ActiveX) (Note: this.
CDN Brokering* Presented By Nick Arnold Authors Alexandros Biliris, et. Al.
Mobile Consumer Experience: designing for fast response time OSCON 2013 David Elfi Intel.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Data Structures & Algorithms and The Internet: A different way of thinking.
Step By Step Windows Server 2003 Installation Guide Step By Step Windows Server 2003 Installation Guide.
Distributed Computing COEN 317 DC2: Naming, part 1.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Virtis-Opis Beta Testing Todd S. Thompson, PE South Dakota DOT Office of Bridge Design August 3, 2011.
The benefits of externalizing Web DMZ-as-a-Service in the Cloud James Smith, Sr. Security Sentrix
_______________________________________________________________________________________________________________ PHP Bible, 2 nd Edition1  Wiley and the.
استاد : مهندس حسین پور ارائه دهنده : احسان جوانمرد Google Architecture.
Best Practices for Building Your Website for Scale with Microsoft SharePoint 2010 Josh Stickler Program Manager Microsoft Corporation OSP333.
NWS Experiences in Outsourcing Web Content Delivery Robert Bunge NWS OCIO 11/2/05.
Computer Networking P2P. Why P2P? Scaling: system scales with number of clients, by definition Eliminate centralization: Eliminate single point.
Enabling cache for monitoring application Alexandre Beche.
Don’t Disconnect Me! The challenges of building offline-enabled web apps Matthias Oßwald,
PHP Performance w/APC + thaicyberpoint.com thaithinkpad.com thaihi5.com.
Accelerating PHP Applications Ilia Alshanetsky O’Reilly Open Source Convention August 3rd, 2005.
LCG Distributed Databases Deployment – Kickoff Workshop Dec Database Lookup Service Kuba Zajączkowski Chi-Wei Wang.
Scalable Data Scale #2 site on the Internet (time on site) >200 billion monthly page views Over 1 million developers in 180 countries.
PHP Form Processing * referenced from
Performance & Security Satish C Ayappan (Drupal Architect- Capgemini)
EGEE-II INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Grid Configuration Data or “What should be.
Web Cache. What is Cache? Cache is the storing of data temporarily to improve performance. Cache exist in a variety of areas such as your CPU, Hard Disk.
Making the Most of a Hybrid Alfresco Solution From Genesys Telecommunications: Michael Katten, Director of Technical Publications Joe McMonagle, Manager.
Ch. 31 Q and A IS 333 Spring 2016 Victor Norman. SNMP, MIBs, and ASN.1 SNMP defines the protocol used to send requests and get responses. MIBs are like.
MICROSOFT AJAX CDN (CONTENT DELIVERY NETWORK) Make Your ASP.NET site faster to retrieve.
Cofax Scalability Document Version Scaling Cofax in General The scalability of Cofax is directly related to the system software, hardware and network.
Effective Wordpress Hosting Service By InstantAppz.
GENERAL SCALABILITY CONSIDERATIONS
1. Public Network - Each Rackspace Cloud Server has two networks
Web Caching? Web Caching:.
Utilization of Azure CDN for the large file distribution
Leaving the State: Sessionless (Stateless) Authentication in D8
Leaving the State: Sessionless (Stateless) Authentication in D8 with Whole Foods Market
Edge computing (1) Content Distribution Networks
AWS Cloud Computing Masaki.
Dreaming up a CMS in Go (golang)
Yale Digital Conference 2019
Presentation transcript:

The Definition Of Crazy Insanity Chris Porter D.O netw3rker

Who is this guy? Chris Porter - Technical Consultant – Acquia 8 years of Drupal Experience 4.5yrs Professional Services Doesn’t learn from mistakes

Level 1: PHP is Crazy

Nervous? Q: How many files does a single freshly installed Drupal page include? A: ~80 files Q: How many files does my current client’s “events” page include? A: 2830* (well, actually it was ~680)

CRAZY: What about 1000 requests? How many times did PHP meet the definition of insane? Crazy = includes * (requests - 1) Stock Drupal: 79,920 My Client: 2,150,000 (!!!!) Actual traffic pattern for that client: 3MM page views per month! 100K per day!

Crazy Medicine: PHP OPCode Caching Opcode Caching is hands down the: Easiest Fastest Most over-looked Single performance improvement you can make. It makes the PHP engine *not crazy*

OPCode Caching Caches the pseudo compiled version of a file Caches the filesystem permissions Stores the cache in memory Shares the memory with other PHP processes Some even provide fast acting data memory space

Use APC – Its Easy 1)Install APC 2)Add the following lines to your php.ini file extension=apc.so apc.enabled=1 apc.shm_segments=1 apc.shm_size=64 apc.stat=0 1)Drink a beer More Detail at:

This Means its working!

10 APC Magic in Action 50s! 15s! APC Configuration Applied Local doc root fix 300ms

Level 2: Your code What you are probably doing that is totally bonkers.

We’ve all done this at least once *This is not real code, I made it up entirely

Lets break it down: 1 request results in: 1 db query service calls 1000 requests results in: 1000 db queries 100,000 service calls That’s a lot of crazy: about 99,900 to be exact.

The Cure Try Drupal’s Cache API ache.inc/7 ache.inc/7 Use the functions: cache_get() and cache_set() If you like data organization, implement your own cache table!

Infrequent updates? Cache the whole thing!

Now who’s crazy? 1 request = 100 webservice calls 1,000 requests = 100 webservice calls 1,000,000 requests = 100 webservice calls No more crazy here!

Level 3: Drupal How you are configuring Drupal to be crazy

Mass Delusion: You are making all of your users crazy Max simultaneous requests time gap

Substantially reduce client requests

Views Caching

Panels Caching

Page Caching

Level 4: Your Webserver Your webserver is acting crazier than you think. It probably has a gnarly case of OCD.

100 pages and 1,000,000 requests Q: How many times did Drupal “bootstrap”? A: 1,000,000 (at least) Q: What’s the definition of crazy here? A: Requests – Pages = CRAZY Your webserver was crazy 999,900 times!

OCD Training: Front-end Caching Things to consider about front end caches: Provide extremely fast content delivery Take Drupal out of the equation for almost all requests. Only works for anonymous users* (mostly)

OCD Meds: Varnish Install Varnish (*nix only) Read Lullabot’s amazing varnish tutorial Use Lullabot’s pre-written “high availability VCL” Get Drupal’s Varnish Module Configure Drupal’s page cache options. Wonder where your server load went

Level 5: Your Infrastructure Your network is delivering the same content over and over again for no other reason than because it can. Your network needs a Quaalude.

Deep thoughts: What happens if your servers network goes down? What happens if your systems fail? (it happens) Why should users in Japan get content delivered from Colorado? Ever wonder why websites say “server down” on one page, but not another?

CDN’s to the rescue Content Delivery Networks distribute your content around the world. Main modes of operation: Reverse Proxy – point your DNS at them, let the magic happen. File Server – put static assets such as images up on the CDN– serve fewer requests.

Pro’s Rapidly scale your anonymous content globally Deliver content in very short routes to consumers Reduce the load on your server Con’s You pay by the byte of data Do it wrong, and you’ll pay for 2x the bytes of data Clearing the cache can take a while Notes: Somewhere around 150 endpoints to deal with

Checking out You just made the front page of: Reddit Slashdot Drudge report Are you still crazy?

Calming Meds: Expected Traffic The CDN will server all of that traffic except: 100 pages * 150 endpoints = 15,000 requests. Varnish will server all previously served page requests: 15,000 – 100 unique pages = 4,900 requests Drupal will bootstrap: 100 times PHP will include: 698 files [SANE]

Summary: Main problem areas PHP – Lack of Opcode Caching Code – Cache things you should only do once Webserver – Use Compression Cluster – Use reverse proxy caching Cloud – Use a CDN

That’s It! Questions? Resources: Lullabot’s Varnish Writuphttp:// varnish-high-availability-multiple-web-servershttp:// varnish-high-availability-multiple-web-servers Configure APC for Drupal: CDN Discussions: Drupal Cache API: Drupal Performance Tips: blogs/enterprise-drupal-performance-caching-hosting/5-things-you-can-do- improve-performance-and-scalhttp:// blogs/enterprise-drupal-performance-caching-hosting/5-things-you-can-do- improve-performance-and-scal