|
1 | | -It should be noted that open-next does not actually deploy the app. It only bundles everything for your IAC to deploy it. |
| 1 | +It should be noted that open-next does not actually deploy the app. It only bundles everything for your IAC to deploy it. |
2 | 2 |
|
3 | 3 | Here is a table comparing the different options to deploy a next.js app: |
4 | 4 |
|
5 | | -| Features | OpenNext | Vercel | AWS Amplify | Docker Standalone | |
6 | | -| --- | --- | --- | --- | --- | |
7 | | -| **Function splitting** | Yes | Yes | No | No | |
8 | | -| **Multiple deployment target** ¹ | Yes | Yes ² | No | No | |
9 | | -| **Serverless** | Yes | Yes | Yes | No ³ | |
10 | | -| **Warmer function** | Yes | No | No | Not necessary | |
11 | | -| **External middleware** | Yes ⁴ | Yes | No | No | |
12 | | -| **Edge runtime support** | Partial Support ⁵ | Yes | Embedded ⁶ | Embedded ⁶ | |
13 | | -| **ISR** | Yes | Yes | Yes | Yes ⁷ | |
14 | | -| **On-Demand Revalidation** | Yes ⁸ | Yes | No | Yes ⁸ | |
15 | | -| **Custom server** | Yes ⁹ | No | No | Yes | |
| 5 | +| Features | OpenNext | Vercel | AWS Amplify | Docker Standalone | |
| 6 | +| -------------------------------- | ----------------- | ------ | ----------- | ----------------- | |
| 7 | +| **Function splitting** | Yes | Yes | No | No | |
| 8 | +| **Multiple deployment target** ¹ | Yes | Yes ² | No | No | |
| 9 | +| **Serverless** | Yes | Yes | Yes | No ³ | |
| 10 | +| **Warmer function** | Yes | No | No | Not necessary | |
| 11 | +| **External middleware** | Yes ⁴ | Yes | No | No | |
| 12 | +| **Edge runtime support** | Partial Support ⁵ | Yes | Embedded ⁶ | Embedded ⁶ | |
| 13 | +| **ISR** | Yes | Yes | Yes | Yes ⁷ | |
| 14 | +| **On-Demand Revalidation** | Yes ⁸ | Yes | No | Yes ⁸ | |
| 15 | +| **Custom server** | Yes ⁹ | No | No | Yes | |
16 | 16 |
|
17 | 17 | 1. Multiple deployment target means that you can deploy the same app to different target like some part to ECS, some part to Lambda etc... |
18 | 18 | 2. Vercel supports only serverless Node (backed by AWS Lambda) and Edge runtime (backed by cloudflare workers) |
19 | | -2. You can deploy a dockerized next.js app to AWS lambda using AWS Lambda Web adapter, but some part like ISR will not work as expected |
20 | | -3. OpenNext supports external middleware, but it is not enabled by default. |
21 | | -4. OpenNext supports edge runtime in node, but every route needs to be deployed separately. OpenNext supports edge runtime in cloudflare workers, but only for app router api routes. |
22 | | -5. Embedded means that the edge runtime is embedded inside the bundle. It emulates a fake edge runtime inside the prod environment. |
23 | | -6. You might experience some inconsistencies with ISR if you have a CDN in front of your app. Next always set the cache-control header to `s-maxage=REVALIDATION_TIME, stale-while-revalidate`, it means that your data (json or rsc) and your html might be out of sync. |
24 | | -7. You need to invalidate the CDN manually. For OpenNext, here is an example for cloudfront |
25 | | -8. OpenNext supports custom server, but it is not enabled by default. You can have a custom server even in a serverless environment. |
| 19 | +3. You can deploy a dockerized next.js app to AWS lambda using AWS Lambda Web adapter, but some part like ISR will not work as expected |
| 20 | +4. OpenNext supports external middleware, but it is not enabled by default. |
| 21 | +5. OpenNext supports edge runtime in node, but every route needs to be deployed separately. OpenNext supports edge runtime in cloudflare workers, but only for app router api routes. |
| 22 | +6. Embedded means that the edge runtime is embedded inside the bundle. It emulates a fake edge runtime inside the prod environment. |
| 23 | +7. You might experience some inconsistencies with ISR if you have a CDN in front of your app. Next always set the cache-control header to `s-maxage=REVALIDATION_TIME, stale-while-revalidate`, it means that your data (json or rsc) and your html might be out of sync. |
| 24 | +8. You need to invalidate the CDN manually. For OpenNext, here is an example for cloudfront |
| 25 | +9. OpenNext supports custom server, but it is not enabled by default. You can have a custom server even in a serverless environment. |
0 commit comments