Core Tip: Goal: To use Apache and tomcat to configure a Web site that can be applied, to meet the following requirements: 1. Use Apache as the httpserver and connect multiple Tomcat application instances, and load balancing. 2. Set the Session Timeout time for the system, including Apache and tomcat 3. List of blocked files for the system, including
Objectives:To use Apache and tomcat to configure a Web sit
. Compiling and installingSetting Installation Parameters[Email protected] nginx-1.10.2]#./configure--prefix=/usr/local/nginx--with-http_ssl_moduleCompiling and installing[[email protected] nginx-1.10.2]# make[[email protected] nginx-1.10.2]# make installOpenSSL generates a test CA certificate: See Resources1.1.1.4. Modify the nginx.conf file for load balancing:Requirements: 1. User through HTTPS access, through the Nginx reverse proxy implementation
. Advert_int 1 ## set the synchronization interval authentication {## set the authentication type and password. master and buckup must be set to the same auth_type PASSauth_pass 1111} virtual_ipaddress {## set multiple VIPs, each row occupies 192.168.1.135} virtual_server 192.168.1.135 80 {delay_loop 6 # Health Check Interval. The unit is slb_algo wrr # The Server Load balancer scheduling algorithm is set t
Systemctl start mariadb
4. Test Results
(1) When the backend server is normal
Web detection page, everything is normal
(2) When the backend Static Page service cluster is down and no static page is displayed, it indicates that the dynamic/static page separation is successful.
Experiment 4: Permission control and session persistence based on ACL 1. Environment preparation:
Machine name
IP configuration
Service role
Remarks
Based on the huge network structure, the use of Cluster Server brings a lot of load problems such as traffic. So the relative, load-balanced technology also emerged. Each technology requires product support, so let's now look at one of the F5 load balancers. So first of all, we first introduce the structure of the product function.Many vendors have launched a
localhost# Host name searched by the Web Client
Errorlog "/opt/apache_log/apppolicerror.log"
Customlog "/opt/apache_log/app1_access.log"Common
Proxypass/balancer: // cluster/stickysession = JSESSIONID | JSESSIONID nofailover = on lbmethod = byrequests timeout = 5 maxattempts = 3
#Balancer: the method used to copy sessions, includingJSESSIONIDOrPHPSESSIONID;Nofailover: On indicates that the
receives multiple concurrent requests to access the Web Services on 61.134.38.5. At this time, the layer-4 switch of Alteon will reasonably allocate these requests to S1, S2, and S3 based on certain algorithms to achieve dynamic load balancing. The above section briefly introduces the application of layer-4 Switching Technology in Server Load balancer. However,
start nginx.5. Open a browser:Enter http: // 192.168.16.16 for accessTest: Disable the website on S1, refresh the browser access, disable the website on S2, open the website on S1, and refresh the browser access.
Core code 1: Add in http {}Copy codeThe Code is as follows: # Set the Server list of Server Load balancerUpstream localhost {# Allocate the backend tomcat servers to the requests based on ip computing to solve the
maximum number of times is exceeded, an error defined by the proxy_next_upstream module is returned. Fail_timeout: the time when the service is suspended after a max_fails failure. Max_fails can be used with fail_timeout. * // * The server load balancer algorithm supported by upstream * // * Round Robin (default ). Each request is distributed to different backend servers one by one in chronological order.
Many large sites, ngixn often as a reverse proxy sever load upstream Web server with high availability mechanism to build a large Web cluster, and to build such a cluster through nginx, it is inevitable that the nginx a very important module: Load Balancer module ( Upstream), as shown below is an introduction to the Nginx Lo
my requirements were met by configuring URL rewrite rules. Assuming that the ARR server provides external services on port 80, after receiving the port 80 request, the server Load balancer will also forward requests to Web applications on port 8080 to process requests or Web applications on port 8080 of other services. General steps
1. Add the ARR server to serverfarm as the Server
HAProxy for Server Load balancer
HAProxy provides high availability, Server Load balancer, and TCP and HTTP application-based proxy. It supports Virtual Hosts and is a free, fast, and reliable solution. HAProxy is especially suitable for websites with extremely high loads, which usually require
-out (fixed session issue: Ensure that the same request is distributed to the same RS) in seconds.Because the Add-p option affects the test effect, the parameter is not added here (note: The time cannot be set to 0)$IPVSADM-T 192.168.64.151:80-r 192.168.159.131:80-m-W 1$IPVSADM-T 192.168.64.151:80-r 192.168.159.132:80-m-W 1-a:=add, increasing the RS in the NAT architecture;-r: Specifies the IP of RS;-M: Specify the LVS mode as NAT (Masquerade)-w:=weig
--rate: Rate--timeout: Shows the session timeout length for TCP, Tcpfin, and UDP-C: Show current Ipvs connection statusRemove all cluster Services:-C: empty Ipvs ruleSave rule: # ipvsadm-s >/Specify Storage pathLoad restore previous rule: # Ipvsadm-r 5. The NAT type instance background of the load Balancer cluster LVS :Director Dispatch host two network cards, th
This article to share the content is about Nginx and PHP installation and configuration six Nginx reverse proxy and Load Balancer Deployment Guide, has a certain reference value, the need for friends can refer to
1. Locate and open the Conf file
2. Load Balancing ConfigurationNginx upstream by default is a poll-based load
requestsDoRouting.First, assume that each request is processed by a computer on the server. If the external request load is evenly distributed to each computer node, the server load balancer will be successful.Without considering the backend technology of distributed databases, the core of server load
nginx+tomcat+memcached Load Balancer Configuration complete process:Objective:Nginx realizes The load balance of Tomcat and uses memcached to realize session sharing.
Configure TOMCAT,JDK First
Put jdk,Tomcat into the site /opt directoryInstalling the JDKCd/optchmod 755 jdk-6u45-linux-x64-rpm.bin./jdk-6u
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.