Puppet using Nginx Multi-port to achieve load balancing

Source: Internet
Author: User

With the increase in application requirements, the need for continuous expansion, the number of servers will also increase, when the number of servers is increasing, we will find a puppetmaster pressure, analytical slow, and occasionally out of "Timeout" such as the error, then what is the optimization method? We find solutions on the puppet web site, discovering that puppetmaster can configure multiple ports, combined with web proxies (recommended lightweight load balancer Nginx), so that puppetmaster affordability can be increased by at least several times, is equivalent to a large extent to optimize the processing capacity of puppet.

1. Following the previous environment settings, our server environment and software versions are:

Server System: CentOS5.8 x86_64

Ruby version: ruby-1.8.5

Puppet version: puppet-2.7.9

Nginx Version: nginx-0.8.46

2.Mongrel Installation

To use the puppet multiport configuration, you need to specify the mongrel type, which is not installed by default, and requires installation:

Yum Install-yrubygem-mongrel

3. Configure puppetmaster

Add the following two lines at the end of the/etc/sysconfig/puppetmaster file, representing the multiport, mongrel type, as shown below:

puppetmaster_ports= (8141 8142 8143 81448145)

Puppetmaster_extra_opts= "--servertype=mongrel--ssl_client_header=http_x_ssl_subject"

4. Installation of Nginx Service

Before you install, make sure that the system has installed the Pcre-devel regular library, and then compile the installation nginx, you need to add SSL module parameter support, Nginx installation process is as follows:

Yum-y Install Pcre-devel

Cd/usr/local/src

Wgethttp://nginx.org/download/nginx-0.8.46.tar.gz

Tar zxvf nginx-0.8.46.tar.gz

CD nginx-0.8.46

./configure--prefix=/usr/local/nginx--with-http_ssl_module

Make && make install && CDs. /

More Wonderful content: http://www.bianceng.cn/Servers/web/

Add WWW user groups and users, as shown in the following command:

Groupadd www

Useradd-g www www

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.