Edit in GitHubLog an issue

ApplicationServer module

The ApplicationServer module provides possibility to use Application Server (Container) to decrease bootstrapping time of each request.

Prerequisites

To take advantage of the Application Server, ensure that you have installed either the OpenSwoole or Swoole PHP extension and configure your Web Server to route all GraphQL requests to the Application Server.

PHP extension installation

Install either the OpenSwoole or Swoole PHP extension, and ensure that corresponding Composer package are also installed to be able to run this extension.

Example of the installation command:

pecl install openswoole-22.0.0 | composer require openswoole/core:22.1.1

Routing requests to Application Server

Configure Web Server to route all GraphQL requests to Application Server.

Here is an example configuration for Nginx:

Copied to your clipboard
location /graphql {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9501/graphql;
}

How to run Application Server

To launch the Application Server, execute the following CLI command: bin/magento server:run. This will start HTTP service on 9501 port for GraphQl area

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.