Server bottlenecks aren’t typically the cause of slow load times, but this doesn’t mean that you are immune from server response times impacting your user’s experience. In fact, server load times can pose a threat to your website’s performance. If you haven’t yet devoted time to optimizing this area, now is the time to start.
How are you defining server response times?
In short, server response time (SRT) is the amount of time it takes for the web browser to receive a response. The clock begins as soon as the web browser makes the request and is often measured by Time to First Byte (ttfb).
According to Google’s PageSpeed Insights, your server response time should be under 200ms.
Before You Begin
Rigor’s Waterfall Charts can help you determine how long it takes for your server to respond to a web browser’s request.
First thing’s first. We recommend gathering data on your current performance so you know exactly how you’re doing. Use this benchmark data at a later point to see the full impact of changes you are making. Full-featured tools, such as Rigor Monitoring, make it easy for you to gather the data you need and display it in an easy-to-understand format.
Five Ways to Reduce Server Response Times
Once you have data on your current performance, it’s time to take steps to make your server response time as fast as possible. Here are five ways to do this.
1. Check Your Hosting
Time spent waiting for your server to respond adds to your final page load times.
You want your pages to load as quickly as possible for your users, so the first thing you need to have is sufficient resources to handle your traffic. If you lack resources then additional traffic results in longer SRTs, meaning your server handles fewer users in a given period.
2. Choose Your Web Server Carefully
While Apache is an excellent and attractive option, you might be able to get better results using something else, such as Nginx or OpenLiteSpeed. While comparing the many options available might seem overwhelming, putting in a bit of time in the beginning, will pay off later as you are better able to handle changes in your server needs.
3. Optimize Your Web Servers
Once you’ve chosen a web server to use, you’ll need to set it up. While it’s tempting to take the easy route and go with the default settings, one size does not fit all. By choosing this option, you run the risk of using a sub-optimal configuration for your needs and usage patterns.
Unfortunately, each web server configuration differs from another, so there’s no generalized solution for optimizing a web server. Refer to the documentation specific to yours for additional information on how to get the best performance possible.
4. Reduce Bloat
If you’re using a content management system (CMS) like WordPress or Magento, your site will accumulate bloat unless carefully managed. Even if you don’t use a CMS, you still run this risk as you add content (e.g. images, new content pages, and so on) to your site over time. As such, cull things that you do not need. Optimize your images, combine your resources, and enable compression since smaller files are your friend when it comes to lowering SRTs.
5. Optimize Your Database
By ensuring that your database can retrieve data as efficiently as possible, you speed up the loading times for your site as a whole, not just the page the browser currently displays. Slow queries are the number one reason why a server responds to a request slowly, so you should spend time identifying ways to prevent bottlenecks.
Server optimization is a deep topic where specific steps vary depending on what server you use. Good places to start with when optimizing include:
- Rewriting your queries so that they return only what you need and are written with performance in mind (for example, use joins instead of loops)
- Using indexes where necessary or appropriate
- Changing your schema to group objects such as tables, views, and stored procedures appropriately
Alternatively, you can reduce the load on your database by using external caches to shift the burden to your front-end.
When your goal is to serve pages as quickly as possible, it is important to pay attention to your SRTs, even if they are not the primary cause for slowdowns. Optimizing your back-end ensures that your front-end runs smoothly. Carefully evaluating your hosting needs, adjusting your web servers, reducing bloat, and optimizing your databases are ways that you can work toward SRTs under 200ms per request.
For additional information on how Rigor can help you monitor and optimize the speed and performance of your apps and websites, contact a member of our team today for a free trial.