Load balancing for solr clusters using nginx on linux

Source: Internet
Author: User
Tags solr
In linux, the use of nginx for The solr cluster load balancing to build a solr cluster needs to use load balancing, but the Test environment does not have a F5Big-IP load balancing switch can use www.2cto.com so it has tried weblogic proxyserver, and Apache, the effect is very poor, two servers...
In linux, server load balancer is required to build a solr cluster for the solr cluster using nginx, but in the Test environment, no F5 Big-IP server load balancer switch can use www.2cto.com, so I tried weblogic proxyserver, and Apache, the results are very poor. after the two servers are configured with server load balancer, the concurrent response speed is not as fast as the one without server load balancer. finally, nginx is used, and the effect is very good, the following describes the installation steps in linux 1 installation preparation nginx software version: nginx 1.2.5 installation package: rhel_nginx-1.2.5-1.el5.ngx.x86_64.rpm Operating system: redhat 5 64-bit 2 installation configuration 2.1 install nginx use command [plain] rpm-I rhel_nginx-1.2.5-1.el5.ngx.x86_64.rpm installation default installation location:/usr/sbin/master configuration file location:/etc/n Gstrap/nginx. other configuration files of conf are located at:/etc/nginx/conf. in directory d, Configure nginx 2.2.1 and enter [plain] vi/etc/nginx/conf in port 2.2. d/default. open the configuration file conf, find the server segment, modify listen 80 to the required Port 2.2.2 configure server load balancer input [plain] vi/etc/nginx/conf. d/default. open the configuration file in conf and enter [plain] upstream nginxproxy {server 192.168.1.100: 7022 max_fails = 3 fail_timeout = 5 h; server 172.23.1.101: 7022 max_fails = 3 fail_timeout = 5 h ;} proxy_connect_timeout 1; proxy_send_ti Meout 300; proxy_read_timeout 300; the server segment in upstream bslgis is the server ip address and port for server load balancer. if the connection exceeds the time set by proxy_connect_timeout and exceeds the number of times set by max_fails, the server is deemed to be down and will no longer be accessed within the time range set by fail_timeout. Locate the location configuration in the "server {}" section and enter proxy_pass http://nginxproxy The final location segment is as follows: [html] location/{root/usr/share/nginx/html; index index.html index.htm; proxy_pass http://nginxproxy ;} Complete configuration file: 2.3 start nginx startup command: if nginx cannot find the command, try to enter the complete path:/usr/sbin/nginx stop command: nginx-s stop restart: nginx-s reload smoothly changes the nginx configuration file (nginx is not restarted) and checks whether the configuration file is correct: nginx-t use [plain] ps-ef | grep "nginx: master" | grep-v "grep" output: root 3735 1? 00:00:00 nginx: masterprocess nginx find the ID of the nginx main process, 3735 use the command kill-HUP 3735, you can update nginx configuration view nginx installation location, [plain] rpm-qpl nginx-1.2.5-1.el5.ngx.i386.rpm
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.