<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mario Trucco on Medium]]></title>
        <description><![CDATA[Stories by Mario Trucco on Medium]]></description>
        <link>https://medium.com/@mario.trucco?source=rss-763b207ec720------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-_3jkX3_QZOoUlGJND30zA.jpeg</url>
            <title>Stories by Mario Trucco on Medium</title>
            <link>https://medium.com/@mario.trucco?source=rss-763b207ec720------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 16:50:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mario.trucco/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Delivering millions of customers websites through Cloudflare]]></title>
            <link>https://www.jimdoverse.com/delivering-millions-of-customers-websites-through-cloudflare-66b3ab08bc5e?source=rss-763b207ec720------2</link>
            <guid isPermaLink="false">https://medium.com/p/66b3ab08bc5e</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[tls]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[cdn]]></category>
            <dc:creator><![CDATA[Mario Trucco]]></dc:creator>
            <pubDate>Wed, 28 Feb 2024 09:49:48 GMT</pubDate>
            <atom:updated>2024-03-01T02:02:39.095Z</atom:updated>
            <content:encoded><![CDATA[<p>Jimdo provides digital tools for microbusiness and solopreneurs, including a <a href="https://www.jimdo.com/website/how-to-create/">Website Builder</a> that brings them online in a matter of few minutes.</p><p>This gives us the duty and the pleasure of delivering millions of customers websites and we are entrusted to do so in a secure, reliable and speedy fashion.</p><p>In this article I want to go into the technical details of how we now do that with the help of <a href="https://www.jimdoverse.com/navigating-the-clouds-jimdos-journey-to-cloudflare-and-beyond-adf074970794">Cloudflare</a>, after a migration that we just completed as part of <a href="https://www.jimdoverse.com/our-journey-toward-simplification-and-vendor-optimization-929b4bcf1fba">our journey toward simplification and vendor optimization</a>.</p><p>For each use case that we migrated to Cloudflare we were able to get rid of some complexity and load on our side, to decommission or scale down some of our own components, and eventually to both serve our customers better and save cost.</p><h3>Jimdosite.com (free domains)</h3><p>We started migrating the simplest use case: “as a solopreneur I want to create a free website”. In this case, the website will have a free domain like, for example, <a href="http://microbusiness.jimdosite.com/">microbusiness.jimdosite.com</a>.</p><p>The reason why moving this to Cloudflare was not too hard is that all these are <a href="http://jimdosite.com/">jimdosite.com</a> subdomains: all we had to do was setup a<a href="https://developers.cloudflare.com/dns/zone-setups/"> Cloudflare zone</a>. We have the need of maintaining our own DNS, so we did the <a href="https://developers.cloudflare.com/dns/zone-setups/partial-setup/">CNAME setup</a> with our existing website delivery infrastructure as origin. With <a href="https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/full-strict/">Full (strict)</a> encryption mode enabled, traffic is encrypted between the visitor and Cloudflare and then between Cloudflare and us, with our origin certificate being verified (it is issued by <a href="https://letsencrypt.org/">Let’s Encrypt</a> thanks to our infra platform whose name is Wonderland 2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqjNQDCq7CqDo4QMLI59bw.png" /><figcaption>Browser &lt;- encrypted -&gt; Cloudflare &lt;- encrypted -&gt; Jimdo Website Delivery (verified)</figcaption></figure><p>With this setup, the free websites created by our users are protected by Cloudflare, with <a href="https://developers.cloudflare.com/waf/">Web Application Firewall</a> rules that we configured (including rate limits, managed rules and challenges for bad bots).</p><p>This first move relieved our infrastructure from a lot of bad requests (because with millions of user websites, we always have one or another of them targetet by scrapers, DDoS attackers and bad bots in general) and now that Cloudflare was blocking them we were able to scale down our own rate limiting infrastructure.</p><h3>Caching</h3><p>Once you have onboarded on Cloudflare your natural next step is to enable their <a href="https://developers.cloudflare.com/cache/">CDN</a> to leverage edge caching.</p><p>For our <a href="https://developers.cloudflare.com/cache/how-to/tiered-cache/#tiered-cache-topology">tiered cache topology</a>, we selected <em>Smart Tiered Cache</em> plus <em>Regional Tiered Cache</em>, to have an additional layer of caching and further reduce origin connections: whenever there is a MISS in a Cloudflare data center in the lower tier, close to the end user, the website content is looked up in a regional hub and served from there if it is a HIT, before checking further away in the upper tier which is closer to us. Our origin is only contacted if all these attempts are a MISS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOsI-o6EbSDE6rST_lA4pw.png" /><figcaption>Cloudflare <em>Smart Tiered Cache</em> plus <em>Regional Tiered Cache</em></figcaption></figure><p>Enabling Cloudflare CDN was a major win for our customers, whose websites can now be served faster especially to visitors who are further from our data centers. A benefit for us was that we could massively downscale our own caching solution, which was powered by a redis cluster that we maintained.</p><h3>Invalidations</h3><p>Our customers update and publish their websites all the time, and they expect the latest changes to be immediately available globally without delays.</p><p>Because of that we call the Cloudflare <a href="https://developers.cloudflare.com/cache/how-to/purge-cache/">Purge</a> API every time they publish. A naive approach would be purging by the hostname of the website (like <a href="http://microbusiness.jimdosite.com/">microbusiness.jimdosite.com</a>) that has just been published. However with millions of customer websites, this would mean that we go over Cloudflare rate limits, observing error codes <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429">429 Too Many Requests</a> from the Purge API.</p><p>The solution is the <a href="https://blog.cloudflare.com/introducing-a-powerful-way-to-purge-cache-on-cloudflare-purge-by-cache-tag/">Cache-Tag Response Header</a>: our origins always adds a tag with the website id to this special header supported by Cloudflare, and we can use it as key when calling the Purge API. The rate limit for this is much more permissive than the one applied on purging by hostname and it suits us comfortably. Additionally, this simplifies the logic on our end because we support multiple domains for the same website, and by purging by the website id tag we don’t have to worry about that.</p><p>We cache very aggressively, for example ignoring query parameters and caching also <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections">redirect</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404">not found </a>responses, which means that we need to use this cache invalidation mechanism in the handling of many other events besides the above mentioned “<em>website published</em>“. Examples are changes to the primary domain associated to a website, or a website being blocked (or unblocked) by our legal team or by our dunning or anti fraud automated systems.</p><h3>Customer domains</h3><p>Jimdosite.com domains are nice (and free!), but when microbusinesses and solopreneurs get serious they will need their own domain (for example microbusiness.website), which <a href="https://help.jimdo-dolphin.com/hc/en-us/articles/360000905146-How-do-I-register-a-domain-for-my-Jimdo-website-">they can register</a> with one of our premium plans.</p><p>To serve those websites through Cloudflare and leverage all the benefits that we have seen so far also for them we needed something more advanced, because of course we couldn’t setup up a new Cloudflare zone for each customer.</p><p>What we do instead is to <a href="https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/create-custom-hostnames/">create a Custom Hostname</a> via Cloudflare API once our systems have completed the registration for the customer’s domain. Besides matching the customer’s domain name, the custom hostname share all the configuration of the Jimdosite.com Cloudflare zone, for example the origin, which is still Jimdo Website Delivery, the tiered caching, the rate limits, the protection against bad bots and so on.</p><p>Our <a href="https://en.wikipedia.org/wiki/Name_server">name servers</a> are authoritative for the domains of our customers, and they respond to clients queries sending them to Cloudflare. Cloudflare recognizes that the requested host matches one of our Custom Hostnames, applies all the rules and serves the content (or asks our Website Delivery when they don’t have a copy).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Md_0axuOOP3AFmzrcuBa-A.png" /><figcaption>From customer domain through Jimdo Name Servers and Cloudflare to Jimdo Website Delivery</figcaption></figure><p>You might be wondering what is about TLS certificates and whether the Full (Strict) encryption mode still works for all these domains. The answer is yes: thanks to <a href="https://www.cloudflare.com/application-services/products/ssl-for-saas-providers/">Cloudflare SSL for SaaS</a>, each custom hostname also gets a certificate verified by a Certificate Authority (Let’s Encrypt or <a href="https://pki.goog/">Google Trust Services</a>). Those are also renewed automatically by Cloudflare.</p><p>Full (Strict) encryption mode still works as for the Jimdosite.com case, except that now the traffic encryption between the visitor and Cloudflare used the certificates provided by SSL for SaaS for the custom hostnames.</p><p>This migration allowed us to decommission our own certificate provisioner infrastructure, which we used to maintain to order and renew Let’s Encrypt certificates for customer domains.</p><p>Also, now that 100% of our customers websites are served trough Cloudflare, we could finally decommision our own rate limiting and caching infrastructure completely.</p><h3>Messaging</h3><p>In this overview we have seen multiple interactions with Cloudflare APIs which must happen as reaction to events that happen in our systems. For example, when a customer registers a domain with Jimdo and our domains backend has finished the automatic DNS setup for them, it is time to create a Cloudflare custom hostname. Other examples that we mentioned above are all the events that trigger cache invalidation.</p><p>To handle these events we used our kafka messaging implementation, and you might read more on how we implemented error handling for that with dead letter topics <a href="https://www.jimdoverse.com/the-power-of-handling-errors-using-a-dead-letter-topic-and-spring-2-3-6e2e719112f2">here</a>.</p><h3>Infrastructure as Code</h3><p>The setup that I described implies a good deal of settings in Cloudflare, but at Jimdo we don’t want to handle setups manually and we write our infrastructure as code: Cloudflare could not be an exception to that. We used the <a href="https://developers.cloudflare.com/terraform/">Cloudflare Terraform provider</a> to make sure that our configuration is on GitHub and changes are performed with our CD pipelines on GitHub Actions.</p><h3>Conclusion</h3><p>In embracing Cloudflare, Jimdo has not only fortified the security and reliability of our customers websites but has also significantly improved the speed and scalability of our services that power them. From protecting free websites to seamlessly handling custom domains, Cloudflare’s suite of features has streamlined operations, enabling us to retire legacy systems and achieve unparalleled efficiency. The strategic use of tiered caching, robust security measures, and automated TLS certificate management underscores our commitment to delivering an exceptional online experience for our users. As we transition to a Cloudflare-centric approach, the future promises continued innovation and excellence in meeting the evolving needs of microbusinesses and solopreneurs worldwide.</p><p>Follow <a href="https://www.jimdoverse.com/">Jimdoverse</a> and visit our website <a href="https://www.jimdo.com/">jimdo.com</a></p><p>We are hiring! Take a look at our <a href="https://careers.jimdo.com/">Careers Page</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66b3ab08bc5e" width="1" height="1" alt=""><hr><p><a href="https://www.jimdoverse.com/delivering-millions-of-customers-websites-through-cloudflare-66b3ab08bc5e">Delivering millions of customers websites through Cloudflare</a> was originally published in <a href="https://www.jimdoverse.com/">Jimdoverse</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>