You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, congratulations on your brilliant design of NextJs. And thanks for maintaining this lively community.
I am trying to build a platform-type web app, where users will create the majority of the content, say like Ebay. I have decided to use useSWR to fetch the user-specific data. Now I am choosing between getStaticProps and getServerSideProps for fetching the cacheable and SEO-able data.
getStaticProps generates HTML and JSON files, both of which can be cached by a CDN for performance.
From the doc, it doesn't elaborate on how exactly getStaticProps with CDN should be served in production. I am wondering if it is referring only to the pure static blog-like web pages, which don't use fallback nor regeneration. I have a feeling that getServerSideProps with CDN in front of server/lambda might be an easier and more performant cache architecture.
Here is a more detailed question list:
How pages getStaticProps with fallback and regeneration should be served with CDN?
Do the network requests have to always go through NextJs when using fallback? Are there examples of putting CDN of prerendered pages in front of server/lambda meanwhile supporting fallback & regen? My goal is to avoid CPU hits and save even more processing time & resources when there is a prerendered page.
Does fallback and regeneration support saving the newly generated HTML and JSON in a remote store like S3, and make NextJS read from it?
If answer is no from question above, when serverless, say Lambda, how does it reuse the newly generated files? Does it rely on non-cold Lambda container memory/state? When with servers, can I share the newly generated artifacts across servers?
Is it not suggested to use getStaticProps to serve a platform type web app like Ebay?
I could have missed some of the docs. Any clues, links, or corrections will be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, congratulations on your brilliant design of NextJs. And thanks for maintaining this lively community.
I am trying to build a platform-type web app, where users will create the majority of the content, say like Ebay. I have decided to use
useSWR
to fetch the user-specific data. Now I am choosing betweengetStaticProps
andgetServerSideProps
for fetching the cacheable and SEO-able data.From the doc, it doesn't elaborate on how exactly
getStaticProps
with CDN should be served in production. I am wondering if it is referring only to the pure static blog-like web pages, which don't usefallback
norregeneration
. I have a feeling thatgetServerSideProps
with CDN in front of server/lambda might be an easier and more performant cache architecture.Here is a more detailed question list:
getStaticProps
with fallback and regeneration should be served with CDN?fallback
®en
? My goal is to avoid CPU hits and save even more processing time & resources when there is a prerendered page.fallback
andregeneration
support saving the newly generated HTML and JSON in a remote store like S3, and make NextJS read from it?getStaticProps
to serve a platform type web app like Ebay?I could have missed some of the docs. Any clues, links, or corrections will be appreciated.
Thanks in advance =]
Beta Was this translation helpful? Give feedback.
All reactions