Next.js Discord

Discord Forum

How can I speed up SSR on Vercel -- I am getting 500-700ms on server response time in Google Page

Answered
Colombian fino hound posted this in #help-forum
Open in Discord
Colombian fino houndOP
Hi all -- I have an SSR page on Vercel, running on experimental-edge. It's working pretty well, but still getting 500-700ms server response delay when testing the url in Google Page Speed. What are some things I should look at?
Answered by Ray
yes app router definitely perform better
View full answer

18 Replies

are you doing database operation? is it serverless or where is your database hosted?
Colombian fino houndOP
we make one call to our API, which has a 20ms response time
nextjs api?
Colombian fino houndOP
No, we have our own REST API that we built, AWS, Oregon Region
you may want to check out this video
Colombian fino houndOP
I am checking it out, thanks!
Colombian fino houndOP
I will consider this and do some testing.... aside from this what should I look at to improve SSR performance? bundle size? possible re-renders?
by caching
also, use react cache to cache a function which will be executed multiple time in a request
Colombian fino houndOP
if I hit my API once in getServerSideProps, then I am only getting that data once? what functions would be executed multiple times?
oh i mean in app router
so you are using page router?
Colombian fino houndOP
yes
I was looking at maybe using App Router if it could somehow speed up the SSR page
yes app router definitely perform better
Answer
Colombian fino houndOP
Nice, I will work on that. Thanks for the help!