Replies: 8 comments
-
Great initiative! I do indeed have a need for something just like that. Here's my scenario:
The alternatives that I was considering were:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Can not see how this is related to Edge Cache : #108 🤔 |
Beta Was this translation helpful? Give feedback.
-
Some of the things I'd like to do with data on the edge:
This is less of a specific use case, but I'd love to see any stores like this accessible via the same set of abstractions in both edge and serverless functions. That'd enable some really interesting use cases I'd think, where serverless functions w/out the constraints of the edge function environment could be used to push data out to the edge function. So for example you might use |
Beta Was this translation helpful? Give feedback.
-
Edge Functions are awesome, as they get that logic as close as possible to the user. However, any functions that require a DB need to do a round trip to the origin server. Being able to cache data at the CDN layer would mean the trips to the origin server could be reduced significantly. As Vercel's Edge Functions are a wrapper around Cloudflare Workers, it would be amazing to get access to something similar to KV storage (for eventual consistency) and Durable Objects (for strong consistency). This would allow the developer to make the trade off between speed and consistency! |
Beta Was this translation helpful? Give feedback.
-
@leerob - Something like this would be very handy ⬇️ for durable and persistent data storage needs import { type NextRequest } from 'next/server'
export const config = {
runtime: 'edge', // 'experimental-edge' as of today
regions: ['iad1', 'dub1', 'bom1'] // https://vercel.com/docs/concepts/edge-network/regions#region-list
}
export default async function handler(req: NextRequest) {
// Below example is for External Service Backend API access but
// similar pattern can be followed for External Backend DB access also,
// let's say with Prisma https://www.prisma.io/nextjs
const data = await fetch(`https://api-${req.region}-external-service.com/data`, {
method: req.method,
headers: {
authorization: process.env.API_KEY,
},
});
// ... other code
} Originally Posted at: https://github.com/orgs/vercel/discussions/974#discussioncomment-4001617 |
Beta Was this translation helpful? Give feedback.
-
We released our first storage solution: Edge Config 🎉 (in private beta)
|
Beta Was this translation helpful? Give feedback.
-
I have an approach that I used to make the backend of my web app: https://rmrf-css.vercel.app work on Vercel.
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone! 👋
Now that we’ve released Edge Functions, we’ve heard from many members of the community they would like a solution for storing some data at the Edge. We also want this 😄 and we’re exploring ideas for what a solution could look like. But, we need to hear from you to make sure it suits your needs.
Beta Was this translation helpful? Give feedback.
All reactions