Centralize region configuration #67172
jamesarosen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
serverless
andedge
region configurationedge
centrallyNon-Goals
Background
Problem 1: Inconsistency
Per the Configuring Regions for Vercel Functions docs,
and
These are configured separately, in separate ways. It's great to have a way to configure things centrally and a separate way to override those configurations on a case-by-case basis. It's not great for each of those to only apply to half of an application.
Problem 2: No Central config for Edge Functions
I can't define the region for edge functions centrally. I can't even extract it into a shared module.
Per the Route Segment Config,
That is, I can't do this:
Use-Case
We run an application that has strict privacy constraints to support GDPR. We absolutely must not run the app in any region outside of the EU.
In order to support that, I need to
regions: ['cdg1']
in myvercel.json
for any serverless functionsexport preferredRegion = 'cdg1'
in every single edge route and layoutIf one developer forgets to do this, we've just broken our contract with our customers.
Proposal
Option 1: functions using the
edge
runtime automatically inheritpreferredRegion
fromregions
fromvercel.json
. Since this might be considered a breaking change, I offerOption 2: functions using the
edge
runtime automatically inheritpreferredRegion
from a newpreferredRegions
option invercel.json
.Beta Was this translation helpful? Give feedback.
All reactions