18.4.0 released Sep 25, 2023
You can run a Vely application as a server by using vf program manager. Your application will communicate with outside world using with FastCGI protocol.
You can access your server application by means of:
Vely server runs as a number of (zero or more) background processes in parallel, processing requests.
- A web server (which is probably the most common way). You need to setup a reverse proxy, i.e. a web server that will forward requests and send replies back to clients; see below.
- The command line, in which case you can use a FastCGI-command-line-client.
- FastCGI-API, which allows any application in any programming language to access your server, as long as it has C linkage (by far most do). This method allows for MT (multithreaded) access to your application, where many client requests can be made in parallel.
To access your application via a reverse proxy (i.e. web server), generally you need to add a proxy directive and restart the web server.
Setting up reverse proxy (web server)
If you use Apache, you need to connect it to your application, see connect-apache-tcp-socket (for using TCP sockets) and connect-apache-unix-socket (for using Unix sockets).
If you use Nginx, you need to connect it to your application, see connect-nginx-tcp-socket (for using TCP sockets) and connect-nginx-unix-socket (for using Unix sockets).
Use vf, for example:
Starting FastCGI server processes
which in general will start zero or more background resident process(es) (daemons) that process requests in parallel.
In a heavy-load environment, a client's connection may be rejected by the server. This may happen if the client runs very slowly due to swapping perhaps. Once a client establishes a connection, it has up to 5 seconds by default to send data; if it doesn't, the server will close the connection. Typically, FastCGI clients send data right away, but due to a heavy load, this time may be longer. To set the connection timeout in milliseconds, set the following variable before starting the application server, for instance:
vf -w 1 <app name>
In this case, the timeout is set to 8 seconds.
You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a link back to this page (dofollow) - see full license at CC-BY-4.0
. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind.