Live data from Hacker News

Storage on Vercel

vercel.com

71–80 of 144 posts

Re: Storage on Vercel

#71
post #4

Cloudflare's R2 costs $0.36 per million read operations (after the 10 million you get for free) [1]. Vercel is wrapping R2 and is charging $2 per million reads [2]. They're also charging $0.15/GB for egress (after the 1GB you get free), when R2 charges nothing, and the storage cost is doubled from $0.015/GB on R2 to $0.03/GB on Vercel. That's quite the cost increase for the DX improvement. [1] https://developers.clou…

Does this mean I have to potentially deal with two vendors when there is an outage? Awesome!

That's their secret, Cap. You've always had to deal with multiple vendors when there's an outage. Vercel has never made it a secret that they're standing on the shoulders of Tier 1 Cloud giants for their hosting backend.

Re: Storage on Vercel

#72
post #50

Earlier quoted context omitted.

You will get better customer support from Vercel. Cloudflare gives almost zero customer support if you are pay-as-you-go plan.

For what it’s worth when I was TL I would regularly hang out on discord and answer questions for R2. I believe the team still does that and the community itself also answers a lot of questions. Now that I TL Workers KV I do the same in that chat room. There’s also the community forums although I find it’s harder to stay on top of those personally. Not trying to say our paygo support is as good. Just saying for those…

The Cloudflare Discord is where it's at.

Re: Storage on Vercel

#73
post #61

This is cool and whatever, but after the work my company has put in to actively move things away from Vercel I'm going to assume it's hugely overpriced by default compared to even other similar SaaS services.

Its extremely expensive, and I'm aware of two companies migrating away from NextJS itself (neither were ever hosting with Vercel, though). I've only talked in depth with one of them, but the reason is complexity: they want "a react framework" and every update to NextJS substantially raises the complexity bar, introducing a large number of features that they don't want or need. There's also been at least one incident…

This is also my concern. If the happy path is Serverless/Edge (on Vercel) with React Server Components I'm in for a big rewrite. I'm holding off any new investments in the Next.js ecosystem until the dust settles or a more community focused and stable alternative arises.

Re: Storage on Vercel

#74

Earlier quoted context omitted.

I don't think you understand what the code is doing. That's a string templating function , not a raw templated string. `${formData.get('name')}` will get passed as a parameter in a var-arg, not stuck straight into the string.

Right. The code converts all expressions into $N-parameters. However Postgres does not support parameters in all locations, eg. this would fail: import { tableName } from "../shared" sql`SELECT * FROM ${tableName} WHERE id=${formData.get('id')}` The @vercel/postgres package needs a big disclaimer that it works very differently from node-postgres and what is and is not allowed.

They've looked at Postgres.js (https://github.com/porsager/postgres) before — wouldn't mind if they enabled those other cases in the same way.

Also, node-postgres is ripe for sql injections because you just concatenate strings yourself when using it...

Re: Storage on Vercel

#75

I really wish this had been Fly or Supabase. I’ve used Neon and it is much less performant and often times completely non responsive. My company already uses Cloudflare so the rest isn’t a big change for us.

Can you elaborate on your issues with Neon? Interested to know

Re: Storage on Vercel

#76
post #62

I looked into serverless postgres offerings a few months ago and came to realize that while it is possible, it doesn't appear that we have figured out how to develop with it as well as we have with traditional postgres. ORMs are fairly incompatible with serverless postgres, and schema migrations are difficult to handle because you have an unknown number of asynchronously updated copies of your code spread around the…

This is why at Xata we have developed our own ORM-like SDK for TypeScript and we store migration files in the repo. The SDK is very lightweight so it runs in any serverless runtime. It also means we can create DB branches on the fly for each PR, with whatever schema is in the repo, and when the PR is merged, the `main` branch gets migrated automatically.

I don't quite follow, but I totally believe that solutions to these problems can be made and maybe your solution really does work well. The issue is that solutions here are not standard yet and thus there will not be much collective knowledge to draw upon. I'd much rather ask engineers to fix age-old RDBMS issues than novel ones that are unsearchable with solutions whose repercussions are not yet known.

There's also issues with complexity even if the solutions get figured out. What are you getting in return? Serverless is great IMO when it's the simplest solution to a problem, ex: "I only have a front end but I really need a simple API action that daisy-chains a few API calls".

Re: Storage on Vercel

#77

the margin that vercel makes on these products that you can easily integrate with nextjs (or anything else that runs on their infra) is crazy. All of them offer easy integration with the edge or lambas functions... I don't see how vercel justifies this price outside of DX

Consumers have always been willing to pay a premium for simplicity & convenience. No difference here: devs will pay for DX.

I understand that bu Vercel KV is almost 2x more expensive than Upstash. Even the vercel/kv package is just a wrapper for upstash/redis - I mean what is the benefit of using Vercel KV instead of Upstash? What DX is improved? Upstash offers a nice UI and easy integration with edge functions and lambas functions. It's the same with neon database and cloudflare r2. The only plus value I see is the centralised dashboard. Paying 2x for a single dashboard?

Re: Storage on Vercel

#78
> import { sql } from '@vercel/postgres';

Careful here. You'd be building a vercel-specific API into the middle of your data access stack. That might be fine... e.g., if it has a limited/specific use or lifetime, so that you know you won't get stuck.

But otherwise, use a standard, portable client. The docs say you can use any postgres client, so you should be able to choose whatever you prefer.

Re: Storage on Vercel

#79

Earlier quoted context omitted.

Right. The code converts all expressions into $N-parameters. However Postgres does not support parameters in all locations, eg. this would fail: import { tableName } from "../shared" sql`SELECT * FROM ${tableName} WHERE id=${formData.get('id')}` The @vercel/postgres package needs a big disclaimer that it works very differently from node-postgres and what is and is not allowed.

They've looked at Postgres.js ( https://github.com/porsager/postgres ) before — wouldn't mind if they enabled those other cases in the same way. Also, node-postgres is ripe for sql injections because you just concatenate strings yourself when using it...

> node-postgres is ripe for sql injections because you just concatenate strings yourself when using it...

Why the heck would you do that?

I guess for any library that accepts SQL, someone might concatenate strings rather than use the parameter handling.

Re: Storage on Vercel

#80
post #61

Earlier quoted context omitted.

Its extremely expensive, and I'm aware of two companies migrating away from NextJS itself (neither were ever hosting with Vercel, though). I've only talked in depth with one of them, but the reason is complexity: they want "a react framework" and every update to NextJS substantially raises the complexity bar, introducing a large number of features that they don't want or need. There's also been at least one incident…

This is also my concern. If the happy path is Serverless/Edge (on Vercel) with React Server Components I'm in for a big rewrite. I'm holding off any new investments in the Next.js ecosystem until the dust settles or a more community focused and stable alternative arises.

What are the leading alternatives? I know about RemixJS, but not too up to date on others and how each of these compare against each other.
Post reply on HN