Services Sites
Last updated
Last updated
In smoxy, users have the option to create sites and assign domains to these sites. These sites contain configurations that apply to all associated domains. A particularly useful feature in smoxy is the use of Conditional Rules. Using these rules, traffic routing based on the hostname can be performed to, for example, route requests to different servers. This guide recommends creating a central "Services" site that multiple domains can refer to. This provides an efficient way to manage services like RabbitMQ, Redis, Matomo, Rundeck, and others without the need to create a separate site for each domain.
Creating a central "Services" site in smoxy offers numerous advantages:
Central Management: With a single "Services" site, you can maintain a consolidated overview of all services used by different domains, significantly simplifying configuration and management.
Reduced Configuration Effort: Instead of creating a separate site for each domain, multiple domains can reference the same "Services" site, minimizing configuration effort and reducing the likelihood of errors.
Efficient Scalability: When adding additional domains or services, new Conditional Rules for the "Services" site need to be created, rather than creating new sites, making system scalability more straightforward.
To effectively utilize the "Services" site, Conditional Rules can be created to route requests to different load balancers or servers based on the hostname. Here's an exemplary approach:
Service Configuration: For each service centrally managed in the "Services" site, create a specific load balancer configuration. This includes information like the service's IP address and port.
Create Conditional Rules: Set up Conditional Rules for each domain that needs to access a service in the "Services" site. These rules consider the hostname (e.g., "rabbitmq.example.com" or "redis.example.com").
Configure Routing: In the Conditional Rules, specify that requests to this hostname should be routed to the appropriate load balancer.
Suppose multiple domains need to access different services. Instead of creating a separate site for each domain, create a "Services" site and set up Conditional Rules for each domain. These rules route requests based on the domain's hostname to the respective load balancers.
The setup of a central "Services" site and the use of Conditional Rules are best practices in smoxy for efficient service management. This simplifies the configuration complexity.