DEV Community

Cover image for Fetch Shared Data in Next.js With Single Request
Pavel Mineev
Pavel Mineev

Posted on • Updated on • Originally published at itnext.io

Fetch Shared Data in Next.js With Single Request

Take a look at caching strategies with NodeJS layer in front of Next.js

While reviewing my current project’s build process, I noticed that generating pages with getStaticProps yields many requests to one endpoint. It’s not a big problem in my case since our backend is quite fast but googling this issue showed that some people are struggling with it. For example, the issue might be serious in case of a slow database or when the backend can’t cope with 100 requests per second. So I decided to try solving this problem and improving the build time of my project.

Read more

Discussion (0)