Thanks for the comments, Eric.

Yes, you can use any number of levels for the custom domain, no matter two or 
three or more.

And the configuration is only in the “HOST_REGEXP” of a delivery service. No 
other parameter needed.


On 6/21/17, 8:48 PM, "Eric Friedrich (efriedri)" <[email protected]> wrote:

    Thanks Zhilin-
      Could I use a domain of just “topdomain-cdn.com” or does it require a 
minimum of three levels?
    
    Is configuration just in delivery service or does the domain_name parameter 
need to be modified too?
    
    
    > On Jun 21, 2017, at 4:56 AM, Zhilin Huang (zhilhuan) <[email protected]> 
wrote:
    > 
    > Hi all,
    > 
    > I am working on a feature to support custom delivery service domain.
    > 
    > Currently in traffic ops, you can configure a “HOST_REGEXP” for a 
delivery service with pattern like:
    > 1)  .*\.my-subdomain\..*
    > 2) my-subdomain.topdomain.com
    > 
    > I think pattern 1) is well known by all of us. However pattern 2) is 
allowed in traffic ops code, but not well supported. The Custom Delivery 
Service Domain feature will fully support pattern 2) and allow “topdomain.com” 
be different with the domain name of a CDN. This will allow to support 
different domains within a single CDN, and share the router/monitor/cache 
servers with a CDN for different (top level) domains.
    > 
    > And “my-subdomain.topdomain.com” in pattern 2) will be used as the RFQDN 
instead of “tr.my-subdomain.cdndomain.com” or 
“edge.my-subdomain.cdndomain.com”. This way, user can fully customize the whole 
domain for a delivery service. The NS records for pattern 2) will be the fqdn 
of the routers in this CDN.
    > 
    > Any comments/suggestions will be welcome. The draft code is ready and 
under testing. And an example is attached in the end of this email.
    > 
    > Thanks,
    > Zhilin
    > 
    > 
    > 
    > Here is the example, suppose we have a CDN with domain name 
“ipcdn.mycompany.com”. And configured 2 delivery services with the following 
“HOST_REGEXP”:
    > DS1:       .*\.test\..*
    > DS2:       test.wholesaler.com
    > 
    > Then in traffic router, the following zone files will be generated:
    > 
    > # ls /opt/traffic_router/var/auto-zones/
    > test.ipcdn.mycompany.com.  test.wholesaler.com. ipcdn.mycompany.com.
    > 
    > # cat /opt/traffic_router/var/auto-zones/test.ipcdn.mycompany.com.
    > test.ipcdn.mycompany.com.       3600    IN      NS      
crdc-router-1.ipcdn.mycompany.com.
    > test.ipcdn.mycompany.com.       3600    IN      NS      
crdc-router-2.ipcdn.mycompany.com.
    > test.ipcdn.mycompany.com.       86400   IN      SOA     
crdc-router-1.ipcdn.mycompany.com. traffic_ops.test.ipcdn.mycompany.com. 
2017062108 28800 7200 604800 30
    > crdc-edge-se-1.test.ipcdn.mycompany.com.        3600    IN      A       
192.168.122.112
    > crdc-edge-se-2.test.ipcdn.mycompany.com.        3600    IN      A       
192.168.122.172
    > crdc-edge-se-3.test.ipcdn.mycompany.com.        3600    IN      A       
192.168.122.110
    > crdc-edge-se-4.test.ipcdn.mycompany.com.        3600    IN      A       
192.168.122.252
    > crdc-router-1.test.ipcdn.mycompany.com. 3600    IN      A       
192.168.122.175
    > crdc-router-2.test.ipcdn.mycompany.com. 3600    IN      A       
192.168.122.96
    > tr.test.ipcdn.mycompany.com.    3600    IN      A       192.168.122.96
    > tr.test.ipcdn.mycompany.com.    3600    IN      A       192.168.122.175
    > 
    > # cat /opt/traffic_router/var/auto-zones/test.wholesaler.com.
    > test.wholesaler.com.    3600    IN      A       192.168.122.96
    > test.wholesaler.com.    3600    IN      A       192.168.122.175
    > test.wholesaler.com.    3600    IN      NS      
crdc-router-1.ipcdn.mycompany.com.
    > test.wholesaler.com.    3600    IN      NS      
crdc-router-2.ipcdn.mycompany.com.
    > test.wholesaler.com.    86400   IN      SOA     
crdc-router-1.ipcdn.mycompany.com. traffic_ops.test.wholesaler.com. 2017062108 
28800 7200 604800 30
    > crdc-edge-se-1.test.wholesaler.com.     3600    IN      A       
192.168.122.112
    > crdc-edge-se-2.test.wholesaler.com.     3600    IN      A       
192.168.122.172
    > crdc-edge-se-3.test.wholesaler.com.     3600    IN      A       
192.168.122.110
    > crdc-edge-se-4.test.wholesaler.com.     3600    IN      A       
192.168.122.252
    > crdc-router-1.test.wholesaler.com.      3600    IN      A       
192.168.122.175
    > crdc-router-2.test.wholesaler.com.      3600    IN      A       
192.168.122.96
    > 
    > # cat /opt/traffic_router/var/auto-zones/ipcdn.mycompany.com.
    > ipcdn.mycompany.com.        3600    IN      NS      
crdc-router-1.ipcdn.mycompany.com.
    > ipcdn.mycompany.com.        3600    IN      NS      
crdc-router-2.ipcdn.mycompany.com.
    > ipcdn.mycompany.com.        86400   IN      SOA     
crdc-router-1.ipcdn.mycompany.com. traffic_ops.ipcdn.mycompany.com. 2017062108 
28800 7200 604800 30
    > crdc-router-1.ipcdn.mycompany.com.  3600    IN      A       
192.168.122.175
    > crdc-router-2.ipcdn.mycompany.com.  3600    IN      A       192.168.122.96
    > 
    > 
    > And in one of the cache server, the following content will be generated 
for remap.config:
    > 
    > # cat /opt/trafficserver/etc/trafficserver/remap.config
    > # DO NOT EDIT - Generated for crdc-edge-se-2 by Traffic Ops 
(https://localhost) on Tue Jun 13 05:59:22 UTC 2017
    > map     http://crdc-edge-se-2.test.ipcdn.mycompany.com/     
http://192.168.122.156/ @plugin=header_rewrite.so @pparam=dscp/set_dscp_0.config
    > map     http://crdc-edge-se-2.test.wholesaler.com/     
http://192.168.122.156/ @plugin=header_rewrite.so @pparam=dscp/set_dscp_0.config
    > 
    > 
    > 
    
    

Reply via email to