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
Percy
Percy8mo ago
Project ID: 8b1e4ae6-f221-4948-a158-23868f94c7db
testerOne
testerOneOP8mo ago
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
testerOne
testerOneOP8mo ago
No description
testerOne
testerOneOP8mo ago
No description
Brody
Brody8mo ago
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.
testerOne
testerOneOP8mo ago
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
No description
No description
No description
No description
Brody
Brody8mo ago
do you have a link to your website where I can reproduce this delay? where are you located?
testerOne
testerOneOP8mo ago
Купить поликарбонат и теплицы в Караганде, Астане, Алма-Ате и други...
Широкий выбор поликарбоната и теплиц в Караганде, Астане, Алма-Ате, Шымкенте, Павлодаре, Усть-Каменогорске и других городах от компании СтройБери. У нас вы найдете сотовый, монолитный, профилирующий поликарбонат, а также высококачественные теплицы и навесы. Закажите прямо сейчас!
testerOne
testerOneOP8mo ago
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
Brody
Brody8mo ago
you are quite far away from your servers who is your domain provider?
testerOne
testerOneOP8mo ago
Vercel frontend ?
Brody
Brody8mo ago
both vercel and railway
testerOne
testerOneOP8mo ago
wait a little bit pls
Brody
Brody8mo ago
this is a SSR rendered page right?
testerOne
testerOneOP8mo ago
PS Cloud Services
Хостинг в Казахстане. Регистрация доменов KZ
Лучший хостинг в Казахстане. Профессионально оказываем услуги с 2003 года. Собственный дата-центр в Алматы (Казахстан). Зарегистрируйтесь и покупайте хостинг и домены онлайн.
testerOne
testerOneOP8mo ago
yes
Brody
Brody8mo ago
are you using a custom domain on your railway services?
testerOne
testerOneOP8mo ago
noop But use custom on the vercel
No description
No description
Brody
Brody8mo ago
this is next right? the frontend I mean
testerOne
testerOneOP8mo ago
Yea
Brody
Brody8mo ago
do you ever have the clients browser call the railway service?
testerOne
testerOneOP8mo ago
I don't quite understand the question
Brody
Brody8mo ago
when a user visits your frontend, will their browser ever make a call to the backend that's running on railway?
testerOne
testerOneOP8mo ago
Yes, product pictures, product descriptions, prices, etc. are stored on the server Also, when placing an order, the data is stored on the server
No description
Brody
Brody8mo ago
sorry but that doesn't quite answer my question, and I'm not too sure how I could clarify further
testerOne
testerOneOP8mo ago
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
No description
Brody
Brody8mo ago
can you please answer my question
testerOne
testerOneOP8mo ago
If I understand correctly then no. It will only call the front, which via the API will call the server part on the railway
Brody
Brody8mo ago
okay that sounds like about right I would recommend running the frontend on railway and connecting to the medusa backend via the private network
testerOne
testerOneOP8mo ago
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..
Brody
Brody8mo ago
deploy the frontend on railway and connecting to the medusa backend via the private network
testerOne
testerOneOP8mo ago
What do you mean by private network?
Brody
Brody8mo ago
railway's private network it allows two services in a project to talk to each other privately
testerOne
testerOneOP8mo ago
Thank you very much I'll try something
Brody
Brody8mo ago
why delete?
testerOne
testerOneOP8mo ago
@BrodyIt didn’t work out and I decided to stop trying and not waste your time
Brody
Brody8mo ago
fragly helped you
Want results from more Discord servers?
Add your server