← Back to all tweets

Tweet by @rauchg

View original on X

I just deployed a Nitro project in 10s to Production on the Hobby tier. The target is the "drag and drop to FTP" experience, and I believe we can do better than 5s actually 😁, with the advent of incremental compilers like Turbopack & Vite. But it's worth pointing out what the cloud has gotten us in the meantime. When I was FTPing PHP files, I had no recourse if something went wrong. Rolling back required manually reverting every mutation to every file. Thus we invented the concept of "deployment images". The most popular imaging format today is Docker. When you deploy to Vercel, we create an immutable snapshot of every deployment, including static assets, CDN configuration, routing logic, and crucially, the core application server functions. On Vercel, this gets you a couple things. One thing that people love is "Instant Rollback". We can atomically revert a mistake with a single click, including purging the global CDN caches and updating the config. Another amazing one, pioneered by DHH's arch-nemesis AWS, is multi-AZ redundancy. It's quite amazing to me that even on the free tier of Vercel, you get not just an insanely high level of network redundancy, but also compute redundancy. You can tolerate entire buildings of a datacenter 'catching fire'. Because the cloud today runs some of the most mission-critical services on the planet, you can go further. We can deploy these "deployment snapshots" across multiple regions, and fail over automatically. That means not just buildings can go offline, an entire city could go offline and your application would work. As a fun fact, I share the dream of the immediacy of syncing a file (or maybe even a line of code), and seeing it online. It was one of the major inspirations for starting @vercel. There're a few things I can't concede though. For example, back then PHP would run as an interpreter, which means that after you sync the file, the speed at which it can be executed was quite limiting, giving a bad experience to end users. They later introduced an "OPcache" which speeds up the interpreter by optimizing certain codepaths into machine code. To us, it's kind of unacceptable that an end-user would have to pay the "tax" of triggering the optimization of your code. That's why we build and optimize your code as part of those 10s (as an aside, it's kinda funny that in his meme the bar is "5s" for not doing this :P). DHH has been vocally against builds with his "nobuild" movement. This is one of the most incomprehensible and inadmissible parts of his rhetoric. As developers, we're supposed to hurt the user experience for our pleasure. But it's a false dichotomy. We can and will have the cake and eat it too. Compilers are awesome, actually, and the foundation of all engineering. I'm excited about how awesome the JS and TS ecosystem is getting. Nitro is becoming the foundation for open and vendor-agnostic deployment, and it's lean and snappy. The tooling (thanks Rust!) is getting blazing fast. And libraries like React, Vue and Svelte are becoming very mature and easier to use.

Image
Santosh Marar
Santosh Marar
@santosh_marar

Hey @rauchg, @ThePrimeagen, @theo - can you please confirm if he’s lying or telling the truth? πŸ‘€

Image
482
Reply