Skip to content

Commit 0a949af

Browse files
committed
no forking
1 parent 7b215e9 commit 0a949af

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/web/docs/src/content/migration-guides/gateway-v1-v2.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,24 @@ instructions to ensure a smooth transition.
88

99
v2 includes several breaking changes and improvements over v1. The most significant changes are:
1010

11+
- [Disabled automatic forking](#forking)
1112
- [New Hive Logger for next-level observability and debugging](#hive-logger)
1213

14+
## Disabled Automatic Forking
15+
16+
We were previously forking workers automatically in v1 when detecting `NODE_ENV=production`;
17+
however, forking workers for concurrent processing is a delicate process and if not done carefully
18+
can lead to performance degradations. It should be configured with careful consideration by advanced
19+
users.
20+
21+
In v2, the automatic forking of workers has been disabled by default. This means that the Hive
22+
Gateway will no longer automatically create child processes to handle concurrent requests. Instead,
23+
you can manually configure forking if needed.
24+
25+
You can configure forking in your `gateway.config.ts` file by using the `fork` option or using the
26+
environment variable `FORK`. These options allow you to specify the number of worker processes to
27+
fork.
28+
1329
## Hive Logger
1430

1531
The Hive Logger is a new feature in v2 that provides enhanced logging capabilities. It allows you to

0 commit comments

Comments
 (0)