@@ -11,14 +11,23 @@ response.
1111
1212This single kernel approach is a convenient default provided by the Symfony
1313Standard edition, but Symfony applications can define any number of kernels.
14- This is useful to execute the same application using a different configuration
15- and a different set of bundles for each kernel:
16-
17- * An application that defines an API could create an ``ApiKernel `` to not have
18- to load all the bundles enabled in the regular web application. This will
19- improve the API performance;
20- * A bundle that doesn't allow multiple instances can define multiple
21- configurations in different files loaded by each kernel.
14+ Whereas:doc: `environments </configuration/environments >` execute the same
15+ application with different configurations, kernels can execute different parts
16+ of the same application.
17+
18+ These are some of the common use cases for creating multiple kernels:
19+
20+ * An application that defines an API could define two kernels for performance
21+ reasons. The first kernel would serve the regular application and the second
22+ one would only respond to the API requests, loading less bundles and enabling
23+ less features;
24+ * A highly sensitive application could define two kernels. The first one would
25+ only load the routes that match the parts of the application exposed to the
26+ public. The second kernel would load the rest of the application and its
27+ access would be protected by the web server;
28+ * An application that uses a bundle which doesn't allow multiple instances could
29+ define two identical kernels to define a different bundle configuration for
30+ each of them.
2231
2332Adding a new Kernel to the Application
2433--------------------------------------