Origins & Loadbalancer
Last updated
Last updated
The Origins and Load Balancers page in smoxy allows you to configure origin servers and load balancers to manage traffic effectively for your smoxy account. This page is divided into two sections: Origins and Load Balancers.
The origins section is designed to define and manage your origin servers, which serve as the backend destinations for your traffic. An origin server is the server where smoxy will forward traffic that is being handled by your site. This could be a web server, an application server, or any server hosting the resources your users need to access.
To add a new origin:
Click the "Add Origin" button.
Provide the following information:
Name: A unique identifier for the origin server.
Protocol: Choose between http
or https
.
IPv4: Enter the IPv4 address of the origin server.
Port: Specify the port the server listens to (e.g., 80 for HTTP or 443 for HTTPS).
The load balancers section allows you to configure rules for distributing traffic across multiple origin servers. This is an essential feature for applications that rely on more than one server to handle their traffic. Load balancing ensures that incoming requests are distributed evenly or according to specified rules across your servers, improving performance and reliability.
If your application relies on multiple servers to handle traffic (e.g., for scaling, redundancy, or fault tolerance), the Load Balancer feature in smoxy is what you need.
Before you can use a load balancer:
You must first create an origin for each of your servers.
Once all the origins (representing your servers) are set up, you can configure a load balancer to distribute traffic among them.
By using smoxy's load balancer, no additional services or servers are required to handle the load balancing process. smoxy itself will take care of balancing the traffic between your servers, simplifying your infrastructure.
To create a new load balancer:
Click the "Add a Loadbalancer" button.
Configure the following:
Name: A unique name for the load balancer.
Hostname (Optional): Define a custom hostname that will overwrite the hostname of all requests passing through this load balancer.
Assign Origins: Choose one or more previously created origins to be part of this load balancer.
For each origin, set a weight (e.g., 1, 2, 3, etc.) to control the traffic distribution ratio between the selected origins. A higher weight means more traffic will be directed to that origin.
Once you have defined your origins and load balancers, you can assign them to specific sites:
Navigate to the "Basic Configuration" section of the desired site.
Locate the "Origin or Loadbalancer" setting.
Select one of the following:
An Origin: Assign traffic to a specific origin server.
A Load Balancer: Assign traffic to a load balancer that manages traffic distribution between multiple origins.
This configuration determines where the traffic for the site will be sent by default.