I am in the process of porting my web app[1] from NextJS hosted at Vercel to Astro/React hosted at Cloudflare, and something that particularly surprises me is that I can render a web app on every request at “the edge” and have response times of 100-200ms. That is almost as fast as fully static pages. I have also definitely noticed an improvement in Cloudflare Worker over the last few weeks; cold starts have practical…
Unpacking Cloudflare Workers CPU Performance Benchmarks
71–80 of 80 posts
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#72It's pretty crazy how some video by a relatively small content creator snowballed into Cloudflare making meaningful changes and addressing platform issues
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#73It’s good that CF is actually trying to improve its platform instead of blaming others for smearing its product. Still, the breakneck pace is a mixed blessing. Things change so fast it’s hard to keep up, and launches often outrun polish. The R2 Data Catalog still lacks Iceberg v3 support; Wrangler has shifted dramatically in just a few months; and Pages seems to be on the way out, leaving me with Workers Assets that…
Fun thing is that this started because somebody claimed that Cloudflare is faster than Vercel. Then somebody who knows what they are doing did benchmarks that showed the opposite. And then worked with Cloudflare to make it faster
I guess that's the difference between building on top of AWS and actually building your own infrastructure.
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#74Apparently part of the algorithm is based on the size of the storage being requested.
Hmm. So, we have historical data of storage requests and for each (i) the size of the request, (ii) how long until the storage is freed, (iii) etc. ....
Guessing about a bizarre case: It might be that on Monday many storage requests of certain small sizes have lifetime just a little longer than the decision to move the request to another category, i.e., the moving effort was inefficient, wasted.
So, in simple terms, for an optimization, for each of the variables have both in the history and real time, make the variable values discrete, altogether may have for some positive integer n a few thousand different n-tuples of variable values; then for each n-tuple pick the best decisions (policies, etc.). Uh, unless this idea has already been tried.
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#75Great write up, focusing on facts without fingerpointing. But I must admit I was somewhat surprised Cloudflare was not already proactively monitoring and tuning the generation sizes. Configuring the generation sizes was table stakes for JVM performance tuning back in the day.
We choose to be transparent when we fix stuff, even if it makes us look a bit silly :-) . We are certainly installing more logging and tracking of this sort of thing! In general I think the GC should auto-adapt as much as possible. It's a bit of an admission of defeat for the GC author if the users have to spend a lot of time tuning the parameters. What we are doing here is removing the tuning that was no longer corr…
Any dev who's been around a while has been bitten by many assumptions or straight blindspots many times.
"Huh..that's weird" has been the entry point to some truly astounding ones over the years for me at least.
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#76Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#77This is why we need competition and independent benchmarks. This shames poor performing product/service into action.
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#78Earlier quoted context omitted.
The database is hosted on Railway. I have enabled Smart Placement that should, depending on request time, automatically use an endpoint closer to the database to speed it up. When requesting a route that includes a database request, the response time on the US east coast is around 200ms and closer to 1000ms in Denmark. I am hoping that the Smart Placement will work better when I go live with the app (still in beta) a…
Have you given Hyperdrive[0] a try? In theory, it should improve performance in your use case where you have a central database (Railway) being connected to from the Edge (your Workers). It moves the DB connection logic closer to your Workers, pools connections, and can also cache queries. (Disclaimer: I work for Cloudflare, but on an unrelated team. Not personally used Hyperdrive, but heard good things!) [0]: https:…
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#79Earlier quoted context omitted.
The database is hosted on Railway. I have enabled Smart Placement that should, depending on request time, automatically use an endpoint closer to the database to speed it up. When requesting a route that includes a database request, the response time on the US east coast is around 200ms and closer to 1000ms in Denmark. I am hoping that the Smart Placement will work better when I go live with the app (still in beta) a…
So a remote, authenticated DB connection over the internet? How many db queries per page generation does that generally work out as?
Re: Unpacking Cloudflare Workers CPU Performance Benchmarks
#80It’s good that CF is actually trying to improve its platform instead of blaming others for smearing its product. Still, the breakneck pace is a mixed blessing. Things change so fast it’s hard to keep up, and launches often outrun polish. The R2 Data Catalog still lacks Iceberg v3 support; Wrangler has shifted dramatically in just a few months; and Pages seems to be on the way out, leaving me with Workers Assets that…
Fun thing is that this started because somebody claimed that Cloudflare is faster than Vercel. Then somebody who knows what they are doing did benchmarks that showed the opposite. And then worked with Cloudflare to make it faster