lb vhost
The lb vhost command manages the shared listening layer that receives the traffic of the vServices that share the same address. No record is created in this layer: only the running status is queried and, when needed, it is restarted. Its panel equivalent is the shared listening information on the vService screen.
There is no adding or deleting in this command
The shared listening layer is formed by itself as the vServices are defined. There are no add, update and delete sub-commands; there are only status and restart.
Command Summary
Querying the Status
status list brings the running status of every shared listening layer: whether it is up or not, how long it has been running, how many times it has restarted, how many vServices pass over it and the addresses it listens to. A layer that the configuration expects but that is not present in the system is reported as an error, and a layer that carries on running although no vService needs it any more is reported as closed.
In the status id command the id of the layer is written without the field name, directly as the value (lb vhost status id <id>).
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | dockerId | Required | Only in the status id command; the id of the layer whose status will be queried. Tab lists them |
| Field | What it does | What is written after it |
|---|---|---|
--output | Selects the format of the output | json · jsonp · tab · comma · semicolon · compact · default |
--filter | Filters the output | The text to be searched; the matching ones are highlighted |
While a problem is being looked for in the vServices that share an address, the health of this layer is looked at first; if the layer is not up, there is no point in looking at the vServices one by one.
Restarting
| Field | What it does | What is written after it |
|---|---|---|
--dockerId | Determines which layer will be restarted | The layer id. If it is not given, all the shared listenings are restarted; normally there is only one |
--hardReload | Determines how the restart will be done | false (default) asks the running process to read the configuration again and preserves the existing connections · true creates the layer from scratch and drops the connections |
A hard restart cuts all the shared services
All the vServices that share an address pass over this layer. --hardReload true drops the connections of all of them at the same time; it should be preferred only when a configuration refresh is not enough.
Examples
Things to Know
- The layer is formed by itself. When the vServices that share the same address are defined, the shared listening layer is formed as well; it is not added by hand.
- Normally there is a single layer. When
--dockerIdis not given, all the shared listenings are targeted; in the system there is usually one. - A soft refresh preserves the connections. The default restart makes the configuration be read again; the clients in a session are not affected.
- The status output distinguishes two special cases. A layer that is in the configuration but not in the system appears as an error, and a layer that has become unnecessary but carries on running appears as closed.
