performance, an overview

Post on 07-Dec-2014

165 Views

Category:

Internet

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Overview of web site performance.

TRANSCRIPT

PERFORMANCEAN OVERVIEW

HAVE YOUR CACHE AND EAT IT TOOCreated by Tony Aslett / @taslett

PERFORMANCETime taken to render in a browser/device.

Neo, follow the white rabbit.

AFFECTING PERFORMANCENetwork speedServer responseFile sizeNumber of requests

BROWSER REQUEST1. User: requests a page from the browser2. Network: DNS finds the server and sends request3. Server: responds to the page request, generates page.4. Network: the page is returned.5. Browser: Renders the page, pulls the files (requests) together

HTTP HEADERSHeaders are sent to and from the server with the request.

Tell points along the path of the request if cache can be used.

REQUEST HEADERSBrowser, user agentip addressCompression support, gzipCache-controlCookiesReferer

RESPONSE HEADERSLast-modifiedExpiresCache-controlE-tag

SAFE TO CACHEAnonymous trafficScripts and stylesheetsImages

BE WARY OF CACHING:form, post datalogged in usersUser specific content/blocks etc.Dynamic contentHTTPS SSL

GOOGLE HTTPS EVERYWHEREGoogle is encouraging the use of https by increasing ranking

HTTPS as a ranking signalhttp://youtu.be/cBhZ6S0PFCYpossible rewrite of caching rulesNo support for SSL in varnish

CACHE LOCATIONSBrowserNetwork: proxyServer: database, memoryCode

BROWSER CACHEFast, no downloadHeaders cache-control:max-age-?From the second resource loadUse CDN for re-useable external resources

NETWORK CACHEProxyCDN: Content Delivery Network, cloudflareCloser to the browser/userOpera mobile turboCloud Browsers, Maxthon

SERVERWatch CPU and Memory usage, new relicOpcode cache, APCMemcacheVarnishnginxSPDY

APCPHP is converted to opcode (computer readable) on the flyAPC stores files as opcode in memory for reuseSignificant improvementPHP 5.4? has it's own opcode cache

MEMCACHEKey value stored in memoryWorks well with specific table dataReplaces cache tables

VARNISHSits before the web serverVery fast 300X

CODE DRUPALTrack slow queriesAvoid excessive loopsUse drupal_staticCache Views, entities, Blocks blockcache_alterStatic files and content, Boost

FILESLimit number and sizeCompressAllow cachingDon't delay rendering

PERFORMANCE TOOLSFind your bottle neck and test your solution.

BROWSER TOOLSinbuilt developer tools.extensions e.g. pagespeed, yslow

Network requests, file sizes, headers...

TESTING/REPORTING TOOLSab Apache benchJMeterWebmaster toolsWhat do you use?

top related