smoxy
English
English
  • Welcome to smoxy
  • Changelog
  • Support Contact
  • Migration of Load Balancers and Domains
  • Account
    • What is an Account?
    • Site Overview
      • Add a new domain
    • Origins & Loadbalancer
    • Domain Overview
      • SSL
    • DNS Overview
    • Team
    • IP Lists
    • Billing
  • Sites
    • What is a Site?
    • Dashboard
    • Page Rules
      • Page Rules - Use Cases
    • Conditional Rules
      • Conditional Rules - Use Cases
    • Image Optimization
    • Acceleration
    • Security
    • Basic Configuration
    • Redirect Sites
  • Developer Guide
    • GeoIP Headers (Request Metadata)
    • Cache Invalidation
    • Best Practices
      • Services Sites
      • Flush Tags
      • Test configuration options
      • Cache key configuration for images
    • Cloudflare Setup
    • Frameworks
      • Shopware 6
Powered by GitBook
On this page
  • Benefits of the central "Services" Site
  • Using Conditional Rules in the "Services" Site
  • Example usage

Was this helpful?

  1. Developer Guide
  2. Best Practices

Services Sites

Last updated 7 months ago

Was this helpful?

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 . 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.

Benefits of the central "Services" Site

Creating a central "Services" site in smoxy offers numerous advantages:

  1. 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.

  2. 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.

  3. 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.

Using Conditional Rules in the "Services" Site

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:

  1. 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.

  2. 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").

  3. Configure Routing: In the Conditional Rules, specify that requests to this hostname should be routed to the appropriate load balancer.

Example usage

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.

Conditional Rules
Possible overview of conditional rules of a "Services" site
Example configuration of a conditional rule for forwarding traffic depending on the host name