Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Loading in …3
×
1 of 20

Site speed Server Optimization

1

Share

Download to read offline

Pubcon Pro presentation on Server Optimization for a Speedy Website.

Related Books

Free with a 30 day trial from Scribd

See all

Site speed Server Optimization

  1. 1. @shellyfagin@shellyfagin Advanced Server Optimization For Wicked Fast Websites
  2. 2. @shellyfagin
  3. 3. @shellyfagin Server Stacks LAMP
  4. 4. @shellyfagin Server Stacks
  5. 5. @shellyfagin Server Stacks THE DATABASE Is there a better option? SINCE 1995
  6. 6. @shellyfagin Server Stacks DATABASE OPTIONS
  7. 7. @shellyfagin Server Stacks DATABASE OPTIONS • Originally Forked from MySQL • Open Source (Free) • Drop-in Replacements for MySQL • Updated More Frequently • Uses the same SQL Queries • FASTERTHAN MYSQL
  8. 8. @shellyfagin Server Stacks DATABASE OPTIONS
  9. 9. @shellyfagin Caching • On Page-Caching • Web Server Caching
  10. 10. @shellyfagin On Page Caching
  11. 11. @shellyfagin Web Server Caching mod_pagespeed
  12. 12. @shellyfagin Web Server Caching
  13. 13. @shellyfagin Web Server Caching mod_pagespeed
  14. 14. @shellyfagin Object Caching
  15. 15. @shellyfagin NGNIX Server NGNIX UNIT SSL Support Just Added
  16. 16. @shellyfagin Reverse Proxy
  17. 17. @shellyfagin Reverse Proxy
  18. 18. @shellyfagin Load Balancers
  19. 19. @shellyfagin Load Balancers
  20. 20. @shellyfagin THAT IS ALL! SHELLY@HIGHLYSEARCHED.COM @SHELLYFAGIN http://bit.ly/site-speed-pubcon-pro

Editor's Notes

  • Let’s first talk about PHP. If your working on a site that’s more than 3 years old, there’s a good chance your server might still be running PHP 5.6 or older. By December 31st, 2018 5.6 will no longer be supported.
  • Both Databases are great options for MySql replacements. MariaDB installs very easy for me, while Percona seems to require some workarounds to get to running but a seasoned server pro will have no trouble getting it up and running in now time. Percona was built with Performance in mind so if you have a larger site or a site that might see large surges of traffic due to content going viral, using Percona will see a big difference. I’ve seen a 2.0 second savings from going from MySql to MariaDB on a test site.
  • On Page Caching is typically handled by a plugin. In WordPress, common plugins are WP Super Cache, WP Total Cache or my personal favorite WP Rocket.
  • The next option is to add an HTTP cache at the web server level. The way it works is that the web server will cache all responses to requests that get forwarded to PHP. This solution is better than a caching plugin because it doesn’t need to touch PHP at all.
  • Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your site architecture. If your using Varnish with a CMS like WordPress or Magento, look for a plugin which gives you the ability to purge Varnish Cache easily after you’ve made changes to the website. WP-Rocket has this built in to it’s plugin as well which is handy. Also it’s important to note: Varnish needs some settings configured after it’s initially installed. If you install it on your sever and see a decrease in performance, it’s probably still needs to configure settings like Setting Cache-Control: Max-Age, etc…
  • Redis is an in-memory data structure store, similar to a database. In WordPress, Redis can be used to store the values generated by WordPress native object cache so that cached objects can be reused between pageloads. Using an object cache allows for the reuse of cached objects rather than requiring the MySQL database to be queried a second time for the same object.
  • We’ve been discussing Apache, but there is a server that is actually more superior and has better performance. Nginx has grown in popularity since its release due to its light-weight resource utilization and its ability to scale easily on minimal hardware. Nginx excels at serving static content quickly and is designed to pass dynamic requests off to other software that is better suited for those purposes.
  • Another option is to place Nginx in front of Apache as a reverse proxy. This will allow Nginx to to handle all requests from clients without loosing some of the functionality that we are all used to with Apache. This takes advantage of Nginx's fast processing speed and ability to handle large numbers of connections concurrently. For static content, the files will be served quickly by Ngnix and directly to the client. For dynamic content, for instance PHP files, Nginx will proxy the request to Apache, which can then process the results and return the rendered page. Nginx can then pass the content back to the client. By cutting down on the requests the Apache server is asked to handle, we can alleviate some of the blocking that occurs when an Apache process or thread is occupied.
  • Sharing the processing workload among a group of servers rather than relying on a single server prevents any one machine from being overwhelmed by requests.
  • Sharing the processing workload among a group of servers rather than relying on a single server prevents any one machine from being overwhelmed by requests.
  • ×