Hosting & Domaining Forum

Domain Marketplace => Domain Names => Topic started by: webdesignguru on Feb 19, 2023, 07:43 AM

Title: Routing of third-level domains to internal IP addresses
Post by: webdesignguru on Feb 19, 2023, 07:43 AM
Is there a way to redirect traffic from third-level domains to internal IP addresses using commonly available system tools? Additionally, is it also possible to ensure that the implementation is capable of withstanding high levels of traffic without any issues?
Title: Re: Routing of third-level domains to internal IP addresses
Post by: bidabings on Feb 19, 2023, 09:46 AM
Instead of routing, what you require is proxying.

All the A-records direct to the IP address 172.23.35.34. Afterwards, depending on the Host header, the web server on this machine forwards the request to one of the backends. This configuration is established through standard approaches in any contemporary web server.


Essentially, proxying refers to the process of forwarding requests from a client to a server. In contrast, routing involves the selection of a path for network traffic.

The A-records pointing to a specific IP address is a common method used in proxying. This allows the web server to determine which backend to forward the request to.


In summary, while routing and proxying are related concepts, they serve different purposes. Proxying is typically used to improve performance, security, and reliability, while routing is essential for directing network traffic.
Title: Re: Routing of third-level domains to internal IP addresses
Post by: cookaltony on Feb 19, 2023, 10:39 AM
One of the optimal solutions for Web applications is to use nginx on a gateway with a specific configuration:

server{

 listen 80;

 server_name app1.domain.com;

 location / {

 proxy_pass 10.0.0.1:80;

 proxy_set_header Host $http_host;

 }

 }

 server{

 listen 80;

 server_name app2.domain.com;

 location / {

 proxy_pass 10.0.0.2:80;

 proxy_set_header Host $http_host;

 }

 }

 server{

 listen 80;

 server_name app3.domain.com;

 location / {

 proxy_pass 10.0.0.3:80;

 proxy_set_header Host $http_host;

 }

 }

Benefits:
+ If you need to transfer an application, such as app1, to a hosting service, it can be done easily and without disruption.
+ Physical placement becomes irrelevant, allowing for more flexibility.
+ If one of the applications becomes overloaded, you can run it on multiple machines and use nginx's balancing, caching, and other features.

Drawbacks:
- The above configuration only works with HTTP traffic.


In summary, nginx is a popular choice for Web application deployment due to its flexibility and advanced features such as caching and load balancing. However, it's important to note that its configuration only works with HTTP traffic.
Title: Re: Routing of third-level domains to internal IP addresses
Post by: manas on Feb 19, 2023, 11:38 AM
To operate the system, simply register three additional external IP addresses for the host under the domain.com and add them to the A subdomain entries. This will allow traffic from these addresses (either all or specific protocol/ports) to be directed to internal hosts.

However, in my view, this approach is only feasible if access to internal hosts from outside needs to be strictly controlled and reliability can be compromised. Otherwise, if domain.com fails, subdomains will also fail.

In my opinion, it would be easier not to complicate matters with a single entry point and instead provide external addresses for everyone, unless load balancing and other considerations are required.
Title: Re: Routing of third-level domains to internal IP addresses
Post by: toobbiree on Jan 21, 2024, 03:23 AM
One approach would involve modifying the DNS records for the third-level domains to point to the desired internal IP addresses. This can typically be done using the administration interface of the domain name registrar or DNS hosting provider.

Another method would be to utilize the web server configuration to set up virtual hosts for the third-level domains, directing them to the internal IP addresses. This can be achieved by creating appropriate server blocks in the configuration files of the web server software being used.

In terms of ensuring that the implementation is capable of withstanding high levels of traffic without any issues, it is crucial to consider the capacity and scalability of the network infrastructure. Load balancing techniques such as round-robin DNS or dedicated load balancer devices can be employed to distribute traffic across multiple internal servers, thus mitigating the impact of high traffic volumes.

Additionally, implementing caching mechanisms at the network edge or utilizing content delivery networks (CDNs) can help alleviate the load on internal servers and improve overall performance.

Furthermore, thorough testing under simulated high traffic conditions is essential to identify and address any potential bottlenecks or points of failure. Network monitoring and performance tuning should be ongoing processes to ensure the robustness of the infrastructure in handling high levels of traffic.
The successful redirection of traffic from third-level domains to internal IP addresses using commonly available system tools can be achieved through strategic use of DNS modifications and web server configurations. To withstand high levels of traffic, it is imperative to focus on network capacity, load balancing, caching, and thorough testing to ensure a resilient and reliable implementation.