Server: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The Bondix SANE Server is a universal Linux service for x86_64 architectures (other architectures available on request). Thanks to static compilation, there are no special host operating system requirements such as specific LibC versions - the only requirement is kernel support for virtual tun/tap network interfaces. | The Bondix SANE Server is a universal Linux service for x86_64 architectures (other architectures available on request). Thanks to static compilation, there are no special host operating system requirements such as specific LibC versions - the only requirement is kernel support for virtual tun/tap network interfaces. | ||
= Requirements = | == Requirements == | ||
== Resources == | === Resources === | ||
The resource requirement is based on the peak total throughput of the installation and the number of simultaneous tunnel connections. This formula can be used as a rule of thumb for the required memory: | The resource requirement is based on the peak total throughput of the installation and the number of simultaneous tunnel connections. This formula can be used as a rule of thumb for the required memory: | ||
Memory requirement (megabytes) = Bandwidth(Mbit) / 2 + TunnelCount * 5 | Memory requirement (megabytes) = Bandwidth(Mbit) / 2 + TunnelCount * 5 | ||
Example: An installation of 100 tunnels should guarantee 50 Mbit/sec for each instance at full load. The peak bandwidth would thus be 100 * 50 Mbit = 5000 Mbit/sec. Using the above formula, this results in a memory requirement of approx. 3 gigabytes. | Example: An installation of 100 tunnels should guarantee 50 Mbit/sec for each instance at full load. The peak bandwidth would thus be 100 * 50 Mbit = 5000 Mbit/sec. Using the above formula, this results in a memory requirement of approx. 3 gigabytes. | ||
In addition to memory, the number of CPU cores is also critical. Bondix SANE Server distributes incoming tunnels to different CPU cores for load balancing. While the maximum throughput per CPU core depends on the hardware used, 500 - 1000 Mbit can be taken as a conservative estimate. | In addition to memory, the number of CPU cores is also critical. Bondix SANE Server distributes incoming tunnels to different CPU cores for load balancing. While the maximum throughput per CPU core depends on the hardware used, 500 - 1000 Mbit can be taken as a conservative estimate. | ||
Note: These assumptions for storage do not take into account requirements for the host operating system, other services, and the like. Requirements for storage space are negligible. | Note: These assumptions for storage do not take into account requirements for the host operating system, other services, and the like. Requirements for storage space are negligible. | ||
== Public Ports == | === Public Ports === | ||
Bondix SANE Server requires a publicly accessible TCP port (default 443, but freely selectable) and at least one UDP port - the number of UDP ports depends on the | Bondix SANE Server requires a publicly accessible TCP port (default 443, but freely selectable) and at least one UDP port - the number of UDP ports depends on the environments configured. | ||
= Installation = | == Installation == | ||
... | |||
== Configuration == | |||
The default installation script comes with a default configuration that enables the webinterface, where environment and tunnel configuration can be done. However, configuration is very versatile and can be customized. | |||
==== JSON Configuration ==== | |||
Configuration is done using JSON commands. These can either be sent via a raw TCP socket (localhost:5112), or written to a configuration file (in a json-array) that is parsed on start-up. | |||
By default, S.A.NE server checks for the existence of a configuration file in its installation directory (e.g. <code>/opt/bondix/server/saneclient.json</code>) and at <code>/etc/saneserver.json</code>. If you want SANE server to load a configuration from a different location, you can specify it using a command line parameter. | |||
== | ==== Configuration Commands ==== | ||
For a complete reference list of available commands, see [[Server Configuration]]. | |||
] | |||
== Environments == | == Environments == | ||
Environments are a collection of | Environments are a collection of tunnels that share certain resources, like packet buffers, thread, UDP port and virtual network interfaces. | ||
[[File:Server Environment Settings.png|center|frame]] | |||
= Running = | == Running == | ||
The software can be run in the shell using <code>/opt/bondix/server/saneserver</code>, where it will run in the foreground. However, it is recommended to start the service automatically on startup, which can be different depending on the platform. | The software can be run in the shell using <code>/opt/bondix/server/saneserver</code>, where it will run in the foreground. However, it is recommended to start the service automatically on startup, which can be different depending on the platform. | ||
== Parameters == | == Parameters == | ||
Line 82: | Line 53: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| useMMSG || uses useMMSG linux socket API to send & receive multiple UDP packets at once. This improves performance under load, while stable there are some corner cases which can trigger error messages in the log. | | <s>useMMSG</s>|| uses useMMSG linux socket API to send & receive multiple UDP packets at once. This improves performance under load, while stable there are some corner cases which can trigger error messages in the log. | ||
|- | |- | ||
| bondingProxy || Enables the TCP [[Bonding Proxy]]. | | <s>bondingProxy</s>|| Enables the TCP [[Bonding Proxy]]. | ||
|} | |} |
Revision as of 22:44, 13 October 2022
The Bondix SANE Server is a universal Linux service for x86_64 architectures (other architectures available on request). Thanks to static compilation, there are no special host operating system requirements such as specific LibC versions - the only requirement is kernel support for virtual tun/tap network interfaces.
Requirements
Resources
The resource requirement is based on the peak total throughput of the installation and the number of simultaneous tunnel connections. This formula can be used as a rule of thumb for the required memory: Memory requirement (megabytes) = Bandwidth(Mbit) / 2 + TunnelCount * 5
Example: An installation of 100 tunnels should guarantee 50 Mbit/sec for each instance at full load. The peak bandwidth would thus be 100 * 50 Mbit = 5000 Mbit/sec. Using the above formula, this results in a memory requirement of approx. 3 gigabytes. In addition to memory, the number of CPU cores is also critical. Bondix SANE Server distributes incoming tunnels to different CPU cores for load balancing. While the maximum throughput per CPU core depends on the hardware used, 500 - 1000 Mbit can be taken as a conservative estimate.
Note: These assumptions for storage do not take into account requirements for the host operating system, other services, and the like. Requirements for storage space are negligible.
Public Ports
Bondix SANE Server requires a publicly accessible TCP port (default 443, but freely selectable) and at least one UDP port - the number of UDP ports depends on the environments configured.
Installation
...
Configuration
The default installation script comes with a default configuration that enables the webinterface, where environment and tunnel configuration can be done. However, configuration is very versatile and can be customized.
JSON Configuration
Configuration is done using JSON commands. These can either be sent via a raw TCP socket (localhost:5112), or written to a configuration file (in a json-array) that is parsed on start-up.
By default, S.A.NE server checks for the existence of a configuration file in its installation directory (e.g. /opt/bondix/server/saneclient.json
) and at /etc/saneserver.json
. If you want SANE server to load a configuration from a different location, you can specify it using a command line parameter.
Configuration Commands
For a complete reference list of available commands, see Server Configuration.
Environments
Environments are a collection of tunnels that share certain resources, like packet buffers, thread, UDP port and virtual network interfaces.
Running
The software can be run in the shell using /opt/bondix/server/saneserver
, where it will run in the foreground. However, it is recommended to start the service automatically on startup, which can be different depending on the platform.
Parameters
--daemon |
Runs the software as a daemon. |
--nopid |
Does not attempt to create a pid-file at /var/run/saneserver.pid
|
--listflags |
Lists available feature flags |
--flags <FLAG1> <FLAG2>... |
Enables the specified flag(s). Multiple flags are separated using space. |
</path/to/filename.json> |
JSON configuration file that should be used |
Feature Flags
Feature flags are switches that enable certain features that are otherwise unavailable. These features are usually experimental and should be used with caution.
uses useMMSG linux socket API to send & receive multiple UDP packets at once. This improves performance under load, while stable there are some corner cases which can trigger error messages in the log. | |
Enables the TCP Bonding Proxy. |