A Server Change: The Power of Caching
What do you do when your hosting crashes every day? After hours of frustration, we decided it was time for a change.
Our blog platform began with a simple goal: creating a stable, fast, and reliable space where anyone could express their thoughts, ideas and share what they’ve learned. However, as time went on, our initial hosting server kept crashing—sometimes daily—and each crash would last for hours. Realizing we needed a better solution, we explored different hosting services and, after extensive research, landed on Koyeb, a cloud platform that hosts websites on powerful servers. Koyeb seemed promising, but as always with new tech, there were risks.
What's a Server?
In simple terms, a server is like a powerful computer connected to the internet 24/7. It stores your website and makes it publicly accessible for anyone to visit at any time.
The Move to Koyeb:
Switching to Koyeb was exciting and curious-generating. Could it truly outperform our previous host, or would it be another disappointment? Since we were using the free-tier setup, and our server was located in Germany. The result? When we loaded our site, there was some serious lag. This delay wasn’t ideal, as visitors had to wait for the data to make a round trip from wherever they were to the German server. Despite the lag, we observed Koyeb performed better than our previous host. This led us to explore ways to further improve site performance, and that’s when the concept of caching came into play.
Understanding Caching and Its Potential Benefits
But what exactly is caching? Here’s a quick breakdown:
Caching is a technique that temporarily stores copies of your website’s data closer to the user. Think of it as creating shortcuts for your website. So when someone clicks to visit, instead of fetching fresh data from the server every time, a “cached” version—meaning a previously saved copy of the website’s content—saving time and resources.
This means:
- Faster load times for visitors , reducing the time it takes for content to appear.
- Reduced server load, saving resources.
- Improved user experience, as no one enjoys waiting for a slow website.
- Boosted SEO rankings, since search engines like Google prioritize faster websites.
Our Caching Experiment with Koyeb
Eager to speed up our blog, we attempted to configure caching using Cloudflare, But setting up caching wasn't straightforward, and despite our efforts, we couldn’t make it. Eventually, it was time to call it a night.
The Morning Surprise!
The next morning, I casually loaded the site and was stunned—it was lightning-fast! Using the ping
command in CMD, I measured the speed and result was shocking! "76ms" was the average time shown for loading it!
Curious and astonished, I immediately asked my mentor Arjun Krishna, if he had implemented anything overnight. He hadn’t, which led us on a little hunt for answers. That’s when we discovered Koyeb had an inbuilt caching system that automatically optimized our site. And I’m not exaggerating when I say it, it felt like a mini-miracle! cause last day it was taking more than 30sec to load and now just 76ms! This feature was automatically optimizing our site’s content and reducing load times. With no extra configuration from our end, Koyeb’s caching was already working behind the scenes to improve our site’s performance. It was a game-changer!
How Caching Saved Our Blog During Server Downtime
Caching continued to impress us. One day, I couldn’t load the editor page to write new posts. However, the reading page was still available. Exciting right? On enquiring I found Koyeb’s server were turned off for some updates, and told me that I could see the blog but not load the editor page because Koyeb’s caching system had stored a copy of our blog for readers to access, even when the live server wasn’t available. This not only kept our readers engaged but reinforced the value of caching in keeping a site accessible.
The Takeaway
Whether it’s accelerating your site, enhancing user experience, boosting SEO rankings, or ensuring content availability during server hiccups, caching has proven to be indispensable for today’s websites.
If this blog got you curious or reminded you of your own adventures with website optimization, we’d love to hear about them! Sharing experiences not only inspires but helps us all learn and grow.