#Deployment region Vercel

71 messages · Page 1 of 1 (latest)

placid vine
#

Does anyone know and is it possible to deploy the app to vercel EU server. I know functions can be deployed in Europe but every build I make is deployed in US east Cleveland. I need it to be in Europe since my backedn server is in EU.

solid cedarBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

grim hinge
#

The CI/CD builds are always done in the us-east-ohio region, but they may be deployed elsewhere. You can configure it in the Vercel portal.

rugged rose
grim hinge
#

Oh then my functions are deploying to the wrong place as well 😡

tidal scarab
#

I think the static part is cached in CDN which is distributed around the globe, while the dynamic part (which are serverless functions) follows the serverless function config

placid vine
#

The anawer I got from Vercel team is that i can use static IP adress and choose regions for the deployed app or site only if I subscribe to enterprise plan 😦 @grim hinge @rugged rose @tidal scarab thank you all for your help.

solid cedarBOT
#
✅ Success!

This question has been marked as answered! If you have any other questions, feel free to create another post

Jump to answer
grim hinge
# placid vine The anawer I got from Vercel team is that i can use static IP adress and choose ...

I am planning to contact them because that is contrary to their sales sheets and documentation

Changing your Serverless Function region
All Vercel accounts can change the default region of their Serverless Functions. Learn how to change the region in our documentation.

https://vercel.com/guides/choosing-deployment-regions

They mention static ips and multi-region function deployments for enterprise, but that is not what we are asking for. I will let you know if I do any better! All of my data is in us-west-2 !!!

Vercel Documentation

Information on selecting and changing the region your Serverless Functions are deployed to.

rugged rose
grim hinge
#

I had assumed they just did builds in some default and pushed them to other regions

#

But yeah... idk i would need to test it now

rugged rose
#

I'll check my other ones and see if they are randomly assigned

#

It's follows the function location for me (even with project in Washington)

rugged rose
placid vine
#

@rugged rose I think you are right. I will have to try to find another option for Nextjs project deployment. Enterprise plan is tooo expensive to use it for my purpose.

grim hinge
#

it is not random, it is just always saying the build is in Ohio

grim hinge
#

after a bit more investigation, I have concluded that my build and SSR take place in the clevland (us-east-2) AWS region. Using a route.ts like this:

export async function GET(request: NextRequest) {

  const message = await fetch("https://checkip.amazonaws.com/");
  let comment = await message.text();

  return new NextResponse(`${comment} ${process.env.AWS_REGION}`, {
    status: 200,
    headers: { "Content-Type": "text/plain" },
  });  
}
rugged rose
#

so, the thing it says at the top of logs isn't accurate?

grim hinge
#

When the page was output as "static" (ie. all data fetched at build) the IP was in this range, and the region variable was not set. This matches the build log message Running build in Cleveland, USA (East) – cle1 (FYI: cle1 is Vercel-talk for us-east-2)

    {
      "ip_prefix": "18.191.0.0/16",
      "region": "us-east-2",
      "service": "EC2",
      "network_border_group": "us-east-2"
    },

This is unfortunate, because at build time significant amounts of data might be fetched from a database which might be in a different region. Yuck.

rugged rose
#

and the issue of OP where it has to be in Europe 😭

grim hinge
#

On the plus side, by forcing the build to output a lambda instead of a static by export const dynamic = "force-dynamic"; I was able to find that the Lambda was in fact deployed to us-west-2 because the environment variable was set!

#

I mean, it matches my original thought that the lambdas actually were pushed to the right place

rugged rose
#

phew, they are aren't wrong with docs, just for built it is a little weird

grim hinge
#

but yeah, if Vercel is saying being GDPR data residency compliant requires anything "enterprise", that is kind of a joke

rugged rose
#

well ig to use vercel, you need to somehow build youself (in eu) and deploy to vercel without it needing to do any building

#

but npx vercel --production still uses their building system, so idk how to build by self - and if its worth using with the trickery

grim hinge
#

yeah idk, you can also argue that the database establishes residence, not where the front end is built

#

just as long as you aren't statically building in customer info

#

it is a little fuzzy though, I certainly would just host next somewhere else

grim hinge
#

netlify, cloudflare, even next start bascially anywhere

bleak socket
rugged rose
#

(but they don't have the same degree of pnp functions as vercek includes by default)

rugged rose
grim hinge
#

You could still do CI/CD in GitHub actions pretty easily too, but the question begged is... why?

#

does Vercel not care about companies doing business in the EU?

rugged rose
bleak socket
#

you can cache locally as well

grim hinge
#

yes, quota limits

rugged rose
#

so its a viable option, while unfortunate

bleak socket
#

vercel build && vercel deploy --prebuilt is a popular way for people who can't use the git integration for reasons

grim hinge
#

the vercel deploy command allows orders of magnitde less deploys under 'fair use'

#

unless they walked that back

bleak socket
#

in fact, i don't know of any limit in terms of the number of builds on vercel

grim hinge
#

it was a source of ENORMOUS contention a few years ago

rugged rose
bleak socket
# grim hinge it was a source of ENORMOUS contention a few years ago

it was back when i never knew vercel existed so idk about this enormous thing then. but vercel CLI itself doesn't have any separate pricing model as far as i know of. you are limited to 100/3000 deployment per day (hobby/pro plan), regardless of whether you use CLI or native git integration. back when i didn't have vercel pro using the CLI was how i deployed my monorepo (> 3 projects) to vercel, it worked completely fine

grim hinge
#

Deployments Created from CLI per Week hobby 2000 pro 2000 enterprise Custom

#

it is much less austere than it use to be, but still quite less than 42000....

bleak socket
grim hinge
#

Haha, at one time I think it was like 200? They openly said it was to "encourage use of the git integration"

#

vercel is super awesome to use, but when they are frustrating about something...

bleak socket
#

200 then it was a real limit to be concerned about

grim hinge
#

yeah, it was definitely something that could actually happen

rugged rose
#

i thought built time was the only limit...

bleak socket
#

they should just add one row to the pricing page saying 2000 2000 Custom

grim hinge
rugged rose
#

ahh ok 100 per day is decent

grim hinge
#

they are annoying because you can't just throw money at a lot of them

#

it is a little "enterprise cliff"

rugged rose
#

once you are pro, you must be enterprise to get more

grim hinge
#

It actually shows the function region under the build in Deployment Details -> Deployment Summary -> Functions

#

waaaaay on the right

rugged rose
#

lol i didn't realize what its purpose was...

grim hinge