Virtual Server Implementation Method

  
Virtual Server: It is a single entry to the outside world. There are many computers in it to serve it. For those who use it, it is a machine with a single entry point. Specific implementation techniques include Two types: virtual server at the application layer, virtual server at the network layer.
1. The virtual server at the application layer is implemented by forwarding at the application layer, which is equivalent to a proxy server. This is the virtual server often mentioned. Implementation: Apache's ProxyPass can be used to configure the virtual server. (httpd.conf)
If a company's WWW server is http://www.abc.com/Make the following settings in httpd.conf :
ProxyPass /sales http://192.168.0.1/
ProxyPass /rd http://192.168.0.2/
ProxyPass /head http://192.168.0.3/
The above settings take effect In the future, the location of http://www.abc.com/rd will be transferred to http://192.168.0.2.
The access to http://www.abc.com/head will go to http: //192.168.0.2 comes up,
Customer does not interact directly with 192.168.0.x, all requests are forwarded through www.abc.com.
The process is as follows:
client (http://www.abc.com/sales) <--> www.abc.com <--> 192.168.0.1
`
2. The virtual server of the ip layer. It is implemented by the reverse masq of the ip layer.
Implementation: The ip port forward with the linux packet 2.2.x is implemented by rewriting the destination address of the ip header. The way to achieve. You need a management tool to manage this way. This method is also called reverse NAT. //This article comes from the computer software and hardware application network www.45it.com reproduced please specify
Setting method:
1. Kernel compilation select ip_port_forward(??)
2. Use ipmasqadm to set ip_port_forward.
ipmasqadm -A www.abc.com:80 -R 192.168.0.1:80
For details, please refer to Man.. is not right here.
ipmasqadm -A www.abc.com:80 -R 192.168.0.2:80
3.Set ipchains
ipchains -A forward -j MASQ -s 192.168.0.0/24
ipchains -A forward -j MASQ -d 192.168.0.0/24
4. OK..
Test:
1 Now you visit http://www.abc.com/
2 The ip package you visited is sent to www.abc.com and the destination address is changed to 192.168.0.x, x is 1 or 2 It is selected by the system's load balancing algorithm.
3 After processing, the request packet is sent back to www.abc.com and then sent back to the client.
This way, the machine can be expanded.....you The www server load is too large, you can use both methods. Your telnet server load is too large, you can use method 2 to achieve.

Copyright © Windows knowledge All Rights Reserved