News for hackers. Stuff that matters.
Re:Be careful what you test or deploy to Vercel by Rauchg on Thursday April 06, 2023 @06:18PM (#35475292)
Re-posting my Twitter update[1] here:

We've concluded our analysis.

1. We're refunding the overages

2. We identified the root cause

The root cause is that the Astro bundle handed to the deployment process is monolithic. There was a top-level `await` for an RSS endpoint which called an API with `fetch`. The issue is that these two (and the rest of the app) were bundled together!

Therefore, any time the function was invoked, that top-level `await` was running for all endpoints. It never yielded. And it's fully autonomous, which means it'd keep running regardless of even a browser being open once the chain reaction started.

This is a Swiss Cheese[2] kind of failure. It required the top level await, the monolithic bundle, and the RSS function using `fetch` (i.e.: over the network) rather than `import`-ing the data layer API directly.

Most importantly, what we're doing: we are going to deploy a fix to ensure this doesn't happen again, across frameworks. I really appreciate Mike raising this and hopping on a zoom call with me while our team investigated.

As an addendum for HN: we're continuing to refine the tools and patterns to best "harness" the practically-infinite ability for Serverless and Edge functions to scale horizontally. It's an awesome property, but it's taught us valuable lessons. We've come a long way in adding guardrails and alerts, and this will be another value-added protection that future customers will enjoy.

[1] https://twitter.com/rauchg/status/1644099739959590912

[2] https://en.wikipedia.org/wiki/Swiss_cheese_model

Re:Be careful what you test or deploy to Vercel by WXLCKNO on Thursday April 06, 2023 @06:21PM (#35475315)
Good update. Good refund. Well handled.
Re:Be careful what you test or deploy to Vercel by swyx on Thursday April 06, 2023 @08:04PM (#35476284)
well, yes, but it wouldve been better if support had also been trained that this sort of issue gets a refund escalation. one should not have to rank on Twitter AND HN to get good service for a very reasonable failure.
Re:Be careful what you test or deploy to Vercel by llambda on Sunday April 09, 2023 @10:57AM (#35503323)
I'm currently stuck in their support hell and have been told:

1. My issue is not real

2. Okay, your issue is real, but because I'm not paying $$$ we're going to ignore you

3. I should do free work for Vercel and poll their community forums to see how widespread the issue is

4. Their support is only trained to handle frontend issues and because this is an issue with their CDN it's expected that they'll respond incompetently

5. They'll escalate with their CDN team and respond in one week (that was over a month ago, no follow up whatsoever)

It's hard to take Vercel seriously. As a toy, it's probably fine. But I'll ultimately move this project off of their CDN product as soon as it reaches costly volume.

Re:Be careful what you test or deploy to Vercel by josevalerio on Thursday April 06, 2023 @06:51PM (#35475608)
Awesome response, handled well!

You guys are always on top of things community wise, especially Lee Robinson in any related thread :')

Re:Be careful what you test or deploy to Vercel by wut42 on Thursday April 06, 2023 @09:30PM (#35476952)
I don't think we can say it's been "handled well" when the customer had to rant on social media to get CEO attention.

If OP didn't had any followers or else, Vercel would probably had done nothing.

Re:Be careful what you test or deploy to Vercel by josevalerio on Thursday April 06, 2023 @09:43PM (#35477033)
Fair points, hopefully this brings about the needed changes in these billing systems to prevent it happening in the future. It happens all the time on other providers as well. I'm very critical of the actual necessity of these infinitely scalable systems if you find my other comment in this thread
Re:Be careful what you test or deploy to Vercel by lostdog on Thursday April 06, 2023 @07:02PM (#35475707)
And what about billing limits or quotas?
Re:Be careful what you test or deploy to Vercel by 5Qn8mNbc2FNCiVV on Friday April 07, 2023 @09:54PM (#35489645)
Since it runs on AWS, it has the same limit/quota lag as AWS has
Re:Be careful what you test or deploy to Vercel by brundolf on Thursday April 06, 2023 @07:05PM (#35475742)
I've never been able to understand why most usage-based hosting platforms don't give you the option to say "if my bill goes above X, shut down the service instead of continuing to charge me". It seems so easy and obvious, and I'll never ever use a platform for personal projects that doesn't have it
Re:Be careful what you test or deploy to Vercel by Rauchg on Thursday April 06, 2023 @07:23PM (#35475902)
We'll definitely be looking into usage limits after the fix rolls out.
Re:Be careful what you test or deploy to Vercel by brundolf on Thursday April 06, 2023 @09:01PM (#35476738)
Glad to hear!
Re:Be careful what you test or deploy to Vercel by Nathanba on Thursday April 06, 2023 @07:18PM (#35475851)
it seems they make enough money without us as customers, to me it's weird as well.
Re:Be careful what you test or deploy to Vercel by personjerry on Thursday April 06, 2023 @07:23PM (#35475901)
Doesn't AWS offer limits? Smaller companies don't?
Re:Be careful what you test or deploy to Vercel by brundolf on Thursday April 06, 2023 @07:42PM (#35476101)
I thought I remembered someone saying AWS doesn't, and I've heard stories from people on here about other platforms
Re:Be careful what you test or deploy to Vercel by korean-pixel_13 on Thursday April 06, 2023 @09:13PM (#35476828)
I think Vultr offered a similar feature that was helpful for me. It's definitely good to see more companies looking at adopting this feature.
Re:Be careful what you test or deploy to Vercel by danielvaughn on Thursday April 06, 2023 @08:41PM (#35476598)
From what I remember, they don't offer limits, and neither does GCP. They offer billing alerts and that's it. Both cloud platforms operate on what they call a "shared responsibility" model, aka you bill it you buy it.
Re:Be careful what you test or deploy to Vercel by rickette on Friday April 07, 2023 @06:43AM (#35480196)
And these alerts aren't realtime. Meaning damage is already done when you receive an alert 24h after the fact.
Re:Be careful what you test or deploy to Vercel by detaro on Thursday April 06, 2023 @09:03PM (#35476762)
the big clouds usually have something you can wrap around alerting on their usage tracking APIs, but that's often very "eventually consistent" and might be delayed by days. Which is understandable in some cases, is still useful for some cases, but e.g. doesn't reliably protect you from "oh crap a broken config launched way to many VMs and now I've spent 10k in a day"
Re:Be careful what you test or deploy to Vercel by swyx on Thursday April 06, 2023 @08:03PM (#35476281)
there are platforms out there that offer it, but i dont remember their name because its not a feature that leads, its a nice to have.
Re:Be careful what you test or deploy to Vercel by thundergolfer on Thursday April 06, 2023 @08:45PM (#35476629)
It might be really hard to add in retroactively. Otherwise there’s no excuse, it’s such an annoying vulnerability for a customer, even if you can email support and get a refund. Where I work, modal.com, we have enforced budget limits for accounts.
Re:Be careful what you test or deploy to Vercel by brundolf on Thursday April 06, 2023 @08:55PM (#35476703)
> It might be really hard to add in retroactively

I don't see how?

  if (cap != null && service.currentBill > cap) {
    service.deactivate()
  }
Re:Be careful what you test or deploy to Vercel by lozenge on Friday April 07, 2023 @03:41AM (#35479172)
So do you want all your S3 buckets deleted when you reach the cap? How about that pet EC2 with ephemeral storage?
Re:Be careful what you test or deploy to Vercel by brundolf on Friday April 07, 2023 @12:04PM (#35483140)
Sure, it gets more complicated with storage. But I think we're mostly talking about stateless services here

And for storage or storage-having services you could easily have a "shut it down but preserve the data for a comparatively-small recurring fixed storage charge"

Re:Be careful what you test or deploy to Vercel by smt88 on Thursday April 06, 2023 @08:49PM (#35476666)
> I've never been able to understand why so many usage-based hosting platforms don't give you the option to say "if my bill goes above X, shut down the service instead of continuing to charge me".

Large, valuable customers wouldn't use this option. It would only help the hobbyist types who aren't doing anything mission-critical and aren't the platform's most profitable (not big spenders, not particularly loyal because they aren't big enough to tailor their infra to that platform, etc.)

Re:Be careful what you test or deploy to Vercel by brundolf on Thursday April 06, 2023 @08:59PM (#35476727)
I'm not sure that's true. It's probably a lower risk for them, but still, a runaway service can rack up unlimited bills. At some point it matters to everybody. Even if they set it to $CURRENT_CASH_RESERVES, that has non-zero value

And when we talk about the in-between - startups - I'm pretty sure I read at least one anecdote on here about being put out of business by surprise hosting bills

Re:Be careful what you test or deploy to Vercel by encoderer on Thursday April 06, 2023 @11:56PM (#35477877)
With self-serve developer tooling like vercel they are hoping that devs bring the tools to work that they have been prototyping themselves. That’s why there’s a free tier.
Re:Be careful what you test or deploy to Vercel by wruza on Friday April 07, 2023 @08:19AM (#35480812)
Large, valuable customers wouldn't use this option

Unless they prefer to rely on being large and valuable as a leverage, they just have much bigger limits. And even in such autoscale-type company there may be a separate department that would want to limit their budget because they have one. Imagine spending $100k extra accidentally in your office while the whole budget is around $10M and now you can’t simply reach support on terms of “that billion was clearly a mistake”, because $10.1M seems normal.

Re:Be careful what you test or deploy to Vercel by Buttons840 on Thursday April 06, 2023 @11:14PM (#35477604)
I was looking at Jarvislabs for renting some GPUs recently. They use a prepay model. Pay up front and things shut down when the credit is used up.

https://jarvislabs.ai/docs/accounts-user/add-credits/

Re:Be careful what you test or deploy to Vercel by emptysea on Thursday April 06, 2023 @11:31PM (#35477715)
Usually these billing systems are somewhat async so they’re would probably still be overages

Better than nothing though

Re:Be careful what you test or deploy to Vercel by TechBro8615 on Friday April 07, 2023 @07:08AM (#35480369)
This is why I use virtual credit cards with preconfigured spending limits for each vendor.

If this happened to me, and Vercel refused to refund it, I would simply cancel the service and dare them to collect the debt.

Re:Be careful what you test or deploy to Vercel by neurostimulant on Friday April 07, 2023 @10:45AM (#35482079)
Too bad more and more services start rejecting them. For example, GCP started rejecting virtual prepaid cards from my banks a while ago.
Re:Be careful what you test or deploy to Vercel by brianjking on Saturday April 08, 2023 @10:09AM (#35493284)
Because the customers that may use this feature don't make the company any money. The users that do wouldn't want or need this feature.
Re:Be careful what you test or deploy to Vercel by hoofhearted on Friday April 07, 2023 @08:23AM (#35480841)
It’s really cool to see Guillermo actively on HN!