[New feature] Cloudflare for all

So you’re saying that using “www” on the Bubble platform will have advantages as the app grows?

Short answer, yes. You’ll get the most out of Cloudflare + Bubble, both initially and as your app scales by using CNAMEs (whether that is via bare domain CNAME flattening using Cloudflare as your DNS provider or via www) than by using a ALIAS/ANAME setup.

1 Like

@peterj So you are forced now to use www. for the best performance? I don’t get it, twitter does not use www. and certainly has global servers with good performance.

bubble.io does not even seem to use www. so what’s up with that?

Also, would this update interfere with this implementation for “pretty” dynamic URL’s?

And would it allow support for “pretty” dynamic URLs natively?

Thanks for answering questions here.

I’m going to split this response into two parts, technical and practical:

Technical

Twitter runs their own network backbone that superficially resembles Cloudflare’s. They use a technology called “AnyCast” that allows an A record (like 104.244.42.1) to resolve to whatever server is closest to the user. A European user’s computer will think this address is located in Europe, while a US user will think it’s in the US.

Bubble’s not big enough for this… yet. So we use Cloudflare. :slight_smile:

When deciding between www.bubble.io and bubble.io, we had to take many factors into consideration. Since Cloudflare supports AnyCast and bare domain CNAME records, it was technically easier for us to keep the domain as close as possible to our internal servers and our customers were using already.

If you’re familiar with regular expressions, the simplified version of this transition has been little more than changing this

if (/^bubble\.is$/.test(url)) {...}

to this

if (/^bubble\.i[so]$/.test(url)) {...}
2 Likes

On one of my apps - it is now saying I haven’t configured my DNS correctly for my custom domain but I haven’t changed anything. Is this supposed to require us to change all our apps?

If so this is a breaking change?

Thanks
Simon

Something screwy going on here

Practical

This whole conversation has been very helpful, because it’s got me thinking about what we can do to make this transition a net positive for everyone. Faster loads, easier configurations, less time waiting for help with your configuration, etc.

In particular, since most registrars support bare-domain to www redirects (the equivalent of writing a very short .htaccess rule), most users across bubble won’t even need to concern themselves with ALIAS record types. The challenge here is, how do we most effectively communicate this to the Bubble community?

We also knew there would be demand for bare domain records of the type you desire, which is why we have come up with the options we have to support users like you and @sudsy. But since ALIAS and ANAME records are so uncommon, and bare domains only support A records for reasons that go back to the dawn of time, the question we need to answer here is how can we effectively serve your needs, too?

The best solution I have right now for you is, when the time comes, move your DNS to Cloudflare’s free tier. They have the best user interface for these things I’ve seen, and they have hacked DNS in a way that works how most internet users expect.

Is there any chance you can provide a quick 5 minute video walkthrough? Or step by step guide?

I’d also like the bare name domain. So what I’m understanding is that I have to transfer DNS to Cloudflare?

3 Likes

That’s on the roadmap.

1 Like

@peterj has this been launched already, or if not when is it due?

We were aiming for Monday afternoon, but lost three days as our preliminary rollouts exposed non-backward compatible behavior in the new changeset. Since we don’t like making major infrastructure changes after the midway point of the week, rollout will happen no earlier than Monday 10/21.

99% of the code is already live, but it’s being blocked off behind the last 1%.

6 Likes

Peter, You are an absolute legend. Thank you for these updates.

1 Like

Hi, thank you so much, I was licensing cloudflare, and then had problems on bubbles´s side getting errors “not pointing to bubble anymore”, so i paused the cloudflare service. From my experience, it was great, but the app shouldnt be to heavy under permanent development, as the caching technology is then counterproductive, giving you “cached realities” after updates. But generally it is great, and leverages your app up to pehnomenal lighhouse results. What would be nice above this great news (THANK YOU!): PWA instantly with a bubble built in feature - working together with prompts on the chrome or other browser for installations for the app on mobile / desktop , Manifest easy configs (working…) and an easy feature to leverage service worker. I did a lot with these things, but you end up in some difficulties all the time, and it is a uge chunk of work to find the right configs in a bubble universe. As said, being even more difficult with the cloudflare caching (as sometimes the whole cache has to be rolled over / reorganised) to avoid errors in using cloudflare + PWA. So, I know that is much…thank you!

3 Likes

Just checking in as I am very excited about this feature. Is it still scheduled to go live today?

And is this applied to the editor when in preview without a domain attached? Or is it only possible to see the speed when the app is published on a domain?

3 Likes

The piece that is most likely to cause trouble for our existing users is live now. When we’ve triaged any error reports to ensure that we haven’t broken anything important, Cloudflare will go live for all users.

People tend to correlate bugs with whatever change happened most recently, so triage might take a little while. I’m cautiously optimistic that nothing has broken and that we’ll go live on Cloudflare by the afternoon.

Edited to add
This is a change that by its very nature can’t be tested outside a production environment.

I’m currently running through the most finnicky surfaces of the bubble environment and running my own tests.

2 Likes

Hi there @peterj

This all sounds very exciting! I was on the verge of rebuilding a very complex page in Wappler due to the page load times in Bubble, so this could save me a lot of hassle.

As I understand, Cloudflare uses local caching along with clever compression of page content to achieve the download improvements. My concern is that as we develop our app, we may not be able to instantly view the updates we have made due to Cloudflare serving us a local cached copy.

Can we set something in Cloudflare to “development mode” to prevent this happening?

How do we do this?

Can we set it for version_test only?

Can we set it for a single page only?

Thanks!
Antony.

3 Likes

Here at bubble, we eat our own dogfood.

Our main page, bubble.io, is a Bubble app. Our issue tracker is a Bubble app. And so on.

We’ve intentionally been tremendously conservative with the optimization features we turn on, and we’ve been mindful of how to address concerns like yours across the entire platform because these concerns affect us, too.

Cloudflare’s caching strategy is no more aggressive than what we’re already using, and won’t cache anything that we tell it not to. The key in general is that Cloudflare obeys max-age=0 headers, which means that when we set these on pages in test mode, you’ll always get the freshest version.

Is it possible that something goes wrong for you? Yes, but then it’ll go wrong for other users, and we’ll get a bug report (or see it ourselves), we’ll correct the settings, and make sure it doesn’t happen again.

3 Likes

Hi there Peter…

Thanks for your rapid reply (although I’m not finding the analogy with dog food really works for me :frowning: )

I kind of understand what you are saying… so could you please answer these direct questions for me?

  1. Are you saying that we shouldn’t expect to find any more caching on pages than we find when using Bubble to develop our app today?

  2. If we release a page of our app which is quite stable, is there a way to further improve page download speed by setting more caching on it?

  3. I am not familiar with max-age=0 headers. Could you please explain what these are, how they work, and whether I can manage them on a page by page basis in my app?

Many thanks!

Antony.

He is merely saying that they have the same concerns as you have. You won’t be able to control the caching, they will configure it for you.

How would one opt-in for existing users? Will this be available via the App settings or needs to be sent as a request to Bubble Support?