Three things are crucial when you’re hosting business online:
- Having a fast site
- Staying safe from attackers
- Scaling up along with your traffic
Cloudflare can help with all three. But what exactly is Cloudflare and how can a CDN help speed, security, and scalability?
What is Cloudflare?
At the core, Cloudflare is a Content Delivery Network (CDN) composed of hundreds of data centers located in more than 100 countries. Founded by Matthew Prince in 2009, the company has grown to handle five to ten percent of the global internet traffic, making it one of the largest CDNs in the world.
How Does Cloudflare Work?
A CDN makes use of a process called caching. A cache is a place where frequently-viewed data is stored to make it faster to retrieve.
Think about checking the time – if someone asks you what is the answer to the question “What’s 3,485,250 divided by 23,235 ?”;
Everyone fell silent. Some people pulled out calculators to do the math, and finally, someone yelled out the answer after a few seconds.
Then the speaker asked the exact same question again. This time everyone was able to immediately call out the answer.
In that case, the time the class remembers is the cache. Of course, after time passes this cache will not be accurate anymore, so it’s important to refresh it as needed.
Cloudflare will check on your website (also known as the origin) every so often to keep its cache up-to-date. Its CDN will then serve that cache to any visitors requesting your website.
The main benefit of using Cloudflare is that visitors around the world will be downloading your website from a location that’s physically closer to them, giving them faster loading times.
However, it also means that since some of the requests are handled completely by the CDN, your server will experience a lower load, and more visitors will be able to look at your website at the same time.
Filtering Incoming Traffic
Another capability that content delivery networks offer is filtering incoming traffic. This acts as another layer of protection to outside threats, along with your firewall and other security measures you may have implemented.
Cloudflare is known for implementing some of the most powerful filtering techniques on its network, which your site can take advantage of.
Cloudflare is not only a CDN – they also operate the world’s highest-performance Domain Name System (DNS) network.
The DNS system is what translates your domain name into an IP address that a computer can understand and use to talk to a server. Your domain registrar first specifies an Authoritative Name Server (usually called nameserver), which stores all the relevant DNS records.
The DNS resolution process happens before a connection can be established, so it’s another important factor on the loading speed of your website.
In the default configuration, Cloudflare is set up as your domain’s nameserver, so your visitors will enjoy the quick DNS resolution provided by the its network.
What are the Benefits of Cloudflare?
The solution has a free plan that lets you try many of their benefits without an upfront commitment. The only change you need to get started with is to change your nameservers to point to Cloudflare, which allows them to provide you with their fast DNS resolution and to proxy your web traffic through their network. Even in the free tier, it gives you valuable improvements to both performance and security.
Here are four key benefits:
Protection Against Malicious Traffic
Since all traffic to your website first passes through the Cloudflare network, malicious traffic such as DDoS attacks, comment spam, or content scraping can be detected and filtered or rerouted without ever reaching your server in the first place.
Malicious agents are detected using a variety of identifiers, including previously known malicious IP addresses, the type of requests made, any malicious payloads that may be included in the request, or even the timing and frequency of their connections. This is weighed against the security level you’ve set up on your site to determine whether a visitor is let through, if additional verification on the visitor’s browser is required, or if the visit is blocked entirely.
Since your website’s data is cached across the Cloudflare network, site visitors will load your site from their nearest Cloudflare data center which will reduce latency, instead of having to load it directly from your server.
Reduced Server Load
Another benefit of caching is that your server won’t need to handle all of its web traffic. Instead, it provides the Cloudflare network with an up-to-date copy of the site as needed, which is in turn served to your visitors.
Universal SSL Certificate
Setting up an SSL (Secure Sockets Layer) can be trivial, or can be quite a bit of work; depending on your web server and your domain setup. Cloudflare automatically provides you with an SSL certificate on any proxied domain, so your visitors can enjoy a secure connection even if SSL is not set up at your server. You can also set up a flexible SSL setup, so a self-signed certificate can still secure your website in addition to the one it provides.
What Other Protections Does the Company Provide?
One of the most useful features that Cloudflare has is the Under Attack Mode, which can be enabled when needed through the Cloudflare control panel.
The “Under attack mode” is actually one of five security levels that you can set on your site, with the other four being off, low, medium and high. This granularity is useful to mitigate any problems your site may have with bot traffic, even if it doesn’t get to the point of a DDoS attack. You can also set custom security levels for individual pages using Page Rules.
Business and Enterprise Plans
Changing your nameservers may not be ideal if you already have a custom DNS setup, such as for an external mail exchanger. If you are using a custom DNS setup, you can use the Business or Enterprise plans to set up your custom nameservers while still taking advantage of the Cloudflare CDN.
Besides custom nameservers, there are other specialized features provided by the Business and Enterprise plans, such as additional page-by-page rules and custom SSL certificates.
You can learn more about them on the Cloudflare Plans page.
What are the Limitations of Cloudflare?
Content delivery networks such as Cloudflare are not a magic wand, and being aware of their limitations can help you make more effective use of them.
Here are two cases when you may not want to have Cloudflare enabled:
One of the main features of Cloudflare is caching your website data to allow faster loading. This, in turn, means that changes you make to your site may not show up immediately. Thankfully, Cloudflare has the option to disable cache for any domain when needed. Keep in mind that this will affect all visitors to your site. One option to get around this without having to disable cache completely is to use your DNS hosts file to access your server’s IP directly, instead of going through the Cloudflare network.
For Real-Time Data
Just like before, the cache can work against you if your website’s data changes continuously, and you’d like to avoid having your visitors see stale data. Instead of having to disable Cloudflare for your entire site, you can use cache-control directives to tell Cloudflare how long to keep your site’s resources.
What Cloud Space can help you?
We have around 20 case studies of customer buffer and protect their websites using Cloudflare with our best-practice setting configurations. Therefore, we are very confident in providing our initial setup and configuration for different customers.
To learn more about the benefits and our managed services on Cloudflare, please contact Cloud Space for advice:
- Hotline: (+84) 86 980 5768 - LinkedIn: https://www.linkedin.com/company/cloudspacevn - Website: + https://cloudspace.vn + https://hybridcloud.com.vn + https://publiccloud.com.vn