Delay
I will try to describe the problem in as much detail as possible by attaching skins
First
I deployed the backend on the railway according to the guide along with the admin panel, I placed the storefront in Vercel.
__
When the site first loads, I have a lag of 3.5 seconds, or 5.1 at worst.
I tried to solve the issue myself and find the reason, but . to no avail.
Which way can you go to resolve the issue?
37 Replies
Project ID:
8b1e4ae6-f221-4948-a158-23868f94c7db
8b1e4ae6-f221-4948-a158-23868f94c7db
punched the pockets locally to the front and to the back
I'm trying to find an opportunity to connect to the front host and from there push packets to the back. I don't know how to do this in Vercel
Maybe from the railway to vercel to break through the packages
This latency you are seeing is very likely due in part to your services being so far apart geographically from one another, your railway service would be located in us-west, and your frontend would likely not be anywhere close that, and who knows where your database is.
you would ideally want to host everything on railway in a single region.
My entire railroad environment is in one state.
And the frontend for Vercel is located in a neighboring state.
As far as I understand
When I log into my domain poly-house.kz
He makes a request to the front, front makes a request to the backend, receives it and sends it to me.
There should be a minimum difference between the front and back since they are located in neighboring states
do you have a link to your website where I can reproduce this delay?
where are you located?
https://www.poly-house.kz/kz
kazakhstan ^_^
Купить поликарбонат и теплицы в Караганде, Астане, Алма-Ате и други...
Широкий выбор поликарбоната и теплиц в Караганде, Астане, Алма-Ате, Шымкенте, Павлодаре, Усть-Каменогорске и других городах от компании СтройБери. У нас вы найдете сотовый, монолитный, профилирующий поликарбонат, а также высококачественные теплицы и навесы. Закажите прямо сейчас!
I thought it was the images and deleted them
But this saved a maximum of 0.8 - 1.2 seconds
I don’t know if this is possible, maybe it’s a domain issue
you are quite far away from your servers
who is your domain provider?
Vercel frontend ?
both vercel and railway
wait a little bit pls
this is a SSR rendered page right?
PS Cloud Services
Хостинг в Казахстане. Регистрация доменов KZ
Лучший хостинг в Казахстане. Профессионально оказываем услуги с 2003 года. Собственный дата-центр в Алматы (Казахстан). Зарегистрируйтесь и покупайте хостинг и домены онлайн.
yes
are you using a custom domain on your railway services?
noop
But use custom on the vercel
this is next right?
the frontend I mean
Yea
do you ever have the clients browser call the railway service?
I don't quite understand the question
when a user visits your frontend, will their browser ever make a call to the backend that's running on railway?
Yes, product pictures, product descriptions, prices, etc. are stored on the server
Also, when placing an order, the data is stored on the server
sorry but that doesn't quite answer my question, and I'm not too sure how I could clarify further
In order to avoid the option of a delay from the frontend server and domain, I have now deleted all the content, leaving a simple “hello”
And loading is really fast
can you please answer my question
If I understand correctly then no.
It will only call the front, which via the API will call the server part on the railway
okay that sounds like about right
I would recommend running the frontend on railway and connecting to the medusa backend via the private network
Deploy the front locally and connect to the backend?
I’m not sure, maybe my code is simply written very poorly and that’s why there are lags..
deploy the frontend on railway and connecting to the medusa backend via the private network
What do you mean by private network?
railway's private network
it allows two services in a project to talk to each other privately
Thank you very much I'll try something
why delete?
@BrodyIt didn’t work out and I decided to stop trying and not waste your time
fragly helped you