There’s much more we can do to speed things up, if we only turn over the right stones. Whether you’re using WordPress or not, many of these principals can be applied. However we’ll use WordPress as our test case.
Caching keeps frequently accessed objects, images and data closer to where you need them, speeding up access to websites you hit often.
Your browser is the first layer of caching, keeping images and data from websites that you visit often. Next the webserver itself has a caching layer, typically implemented by something like memcache, caching information that it would normally fetch from the database on the backend. This avoids the network roundtrip, and also avoids the load and work of running the query to fetch that data again.
Furthermore you can install what’s called a reverse-proxy on the webserver, such as Varnish. This can bring further speedups and performance benefits to your overall architecture.
On the database server you also do a lot of caching. With MySQL you may configure the query cache, which caches query result sets inside of MySQL, eliminating the need to rerun those queries on subsequent calls. And further the database server has various other caches such as the InnoDB buffer cache, to keep blocks of data in memory, reducing slower requests from disk.
Backups are obviously a crucial component in any enterprise application. Modern internet components are prone to failure, and backups keep your bases covered. Here’s what you should consider:
- Is your database backed up, including object structures, data, stored procedures, grants, and logins?
- Is your webserver doc-root backed up?
- Is your application source code in version control and backed up?
- Are your server configurations backed up? Relevant config files might include those for apache, mysql, memcache, php, email (postfix or qmail), tomcat, Java solr or any other software your application requires.
- Are your cron or supporting scripts and jobs backed up?
- Have you tested all of these components and your overall documentation with a fire drill? This is the proof that you’ve really covered all the angles.
If you do your backups right, you should be able to restore without a problem.