.. Reminder for header structure: Niveau 1: ==================== Niveau 2: -------------------- Niveau 3: ++++++++++++++++++++ Niveau 4: """""""""""""""""""" Niveau 5: ^^^^^^^^^^^^^^^^^^^^ .. meta:: :description: Configuring WAPT Server for large deployments :keywords: install, WAPT, documentation, optimization, large deployment .. _configuring_WAPT_for_large_deployment: Configuring WAPT Server for large deployments ============================================= The default operating system, Nginx and Postgresql settings are adapted for around 400 WAPT agents. If you have more than 400 clients it is necessary to modify a few system level parameters along with PostgreSQL database, Nginx web and WAPT Server python server. In the future the :program:`postconf.sh` script might take charge of this configuration depending on the expected number of client computers. With the following parameters, one WAPT Server should scale up to around 5000 concurrent active clients. You may have more clients in the database if they are not all running at the same time. If you have more than 5000 clients it is recommended to have more than one WAPT Server. The limit in the number of end point clients is due to the bottleneck in the python code and the PostgreSQL backend. WAPT performance gets better with time and in the future WAPT Server might support a large base on a single server. However the Nginx part scales very well and it can takes full advantage of a 10Gbps connection for high load package deployments. Configuration changes for better performance -------------------------------------------- .. note:: **The parameters to be modified below are linked together and should be modified globally and not individually**. Configuring Nginx +++++++++++++++++ In the :file:`/etc/nginx/nginx.conf` file (for Windows :file:`C:\\wapt\\waptserver\\nginx\\conf\\nginx.conf`), modify ``worker_connections`` parameter. The value should be around 2.5 times the number of WAPT clients (n connections for websockets and n connections for package downloads and inventory upload + some margin). .. code-block:: bash events { worker_connections 4096; } Then upgrade the number of *filedescriptors* in the :file:`/etc/nginx/nginx.conf` file (for Windows :file:`C:\\wapt\\waptserver\\nginx\\conf\\nginx.conf`): .. code-block:: bash worker_rlimit_nofile 32768; Configuring the Linux System ++++++++++++++++++++++++++++ Increase the number of *filedescriptors*. The system unit file asks for an increase in the allowed number of *filedescriptors* (LimitNOFILE=32768). We should have the same thing for Nginx. There are a few limits to modify. First we modify system wide the number of *filedescriptors* allowed for Nginx and WAPT. * create the :file:`/etc/security/limits.d/wapt.conf`: .. code-block:: bash cat > /etc/security/limits.d/wapt.conf < /etc/sysctl.d/wapt.conf <