IssueRaiser

RSC and CDN interaction makes next.js inefficient for highload projects

### Link to the code that reproduces this issue https://codesandbox.io/p/devbox/rsc-test-m43xq4 ### To Reproduce 1. Build the application next build 2. Start the application next start 3. Navigate to category 1 4. Navigate to category 2 with hard refresh ### Current vs. Expected behavior **Current Behavior** <img width="815" alt="Screenshot 2024-05-03 at 15 07 20" src="https://github.com/vercel/next.js/assets/37213006/b5599ca4-eedd-45e3-9dec-31c5b6edf18e"> Product 1 appears in category 1 and category 2 Currently they return return identical data, but have a different `rsc` hash **Expected Behaviour** If the data is the same there should be only one `rsc` hash. With a high throughput global ecommerce site I want to cache identical data close to the customer in a CDN. The different `rsc` hashes mean that I will get CDN cache misses and traffic will have to go back to the server, potentially a distance from the customer and with a slower response time. ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 Available memory (MB): 65536 Available CPU cores: 10 Binaries: Node: 18.18.0 npm: 10.1.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: 14.1.0 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config:

Posted by dankain on May 3, 2024, 4:07 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

support (E-commerce)

RSC and CDN interaction makes next.js inefficient for highload projects

dankainMay 3, 2024, 4:07 PM

### Link to the code that reproduces this issue https://codesandbox.io/p/devbox/rsc-test-m43xq4 ### To Reproduce 1. Build the application next build 2. Start the application next start 3. Navigate to category 1 4. Navigate to category 2 with hard refresh ### Current vs. Expected behavior **Current Behavior** <img width="815" alt="Screenshot 2024-05-03 at 15 07 20" src="https://github.com/vercel/next.js/assets/37213006/b5599ca4-eedd-45e3-9dec-31c5b6edf18e"> Product 1 appears in category 1 and category 2 Currently they return return identical data, but have a different `rsc` hash **Expected Behaviour** If the data is the same there should be only one `rsc` hash. With a high throughput global ecommerce site I want to cache identical data close to the customer in a CDN. The different `rsc` hashes mean that I will get CDN cache misses and traffic will have to go back to the server, potentially a distance from the customer and with a slower response time. ### Provide environment information ```bash Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 Available memory (MB): 65536 Available CPU cores: 10 Binaries: Node: 18.18.0 npm: 10.1.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: 14.1.0 react: 18.3.1 react-dom: 18.3.1 typescript: 5.4.5 Next.js Config:

Comments (0)

No comments yet. Start the discussion.

Comment on this issue