Hacker News new | ask | show | jobs
by lucacasonato 1021 days ago
I worked on some of this - happy to answer questions :)
4 comments

When you run `kv = await Deno.openKv()` locally it opens a SQLite database. On Deno Deploy it opens a connection to FoundationDB. How does that mechanism work? Is it using the same URL mechanism as the new Deno.openKv(URL) thing?
Yes, sort of - on Deno Deploy the authentication doesn't come from a token in env vars, but from intrinsic security tickets baked into the Deno Deploy system. Also, it's a bit faster on first connect, because compared to KV connect we can skip the metadata exchange[1] because the information it provides is already present in Deno Deploy through other means. Both the backend service and frontend API (JS->KV) is the same though :)

[1]: https://github.com/denoland/deno/blob/be1fc754a14683bf640b7b...

Typo in your blog post: "first processed at the primary pegion"
What's the cost of additional read regions?
Storage cost + write ops are multiplied by region count
Is it like a businessmodel for Deno?
Yes, the hosted KV solution built into Deno Deploy is one of the ways Deno makes money.