Which Reverse Proxy Is Good?

2 comments

Recently I was assigned to work on reverse proxies So I did some brain storming of some know proxies such as Apache and Squid then Googled to find which are other good reverse proxies are available. There are so many open source reverse proxies in market. Out of these most popular are
1.Apache(this is having lots of disadvantages)
2.Squid
3.Pound

Which reverse proxy is good?
There are so many good reverse proxies some of them ar as below. Please comment on this with your favorite Reverse proxy servers.

Let us have a look on some proxies.
1.Lighttpd (pronounced "lighty" or "Light-TPD") is a web server designed to be secure, fast, standards-compliant and flexible while being optimized for speed-critical environments. Its low memory footprint (compared to other web servers), light CPU load and speed goals make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from dynamic content. Run by many companies where requests are high. Lighttpd is used by some of the biggest websites, including sites such as meebo. Wikimedia runs Lighttpd servers as does SourceForge. Three of the most famous torrent listing websites, the Pirate Bay, Mininova and ISOHunt, which have more than 1,000 hits per second, also use Lighttpd.

Some Features:
1. Load-balancing FastCGI, SCGI and HTTP proxy support
2. Chroot support
3. Select()-/poll()-/epoll() based web server
4. Support for more efficient event notification schemes like kqueue and epoll
5. Conditional rewrites (mod_rewrite)
6. SSL and TLS support, via OpenSSL.
7. Authentication against an LDAP server
8. RRDtool statistics
9. Rule-based downloading with possibility of a script handling only Authentication
Server Side Includes support
10. Flexible virtual hosting
Modules support
11. Cache Meta Language (currently being replaced by mod_magnet) using the Lua programming language
12. Minimal WebDAV support
13. Servlet (AJP) support (in versions 1.5.x and up)
HTTP compression using mod_compress and the newer mod_deflate (1.5.x)
14. Light-weight (less than 1 MB)
Single-process design with only several threads. No processes or threads started per connection.


2.Nginx (pronounced as "engine X") is a lightweight, high performance
webserver/reverse proxy and e-mail (IMAP/POP3) proxy. It can serve 500 million requests per day. Currently nginx doing reverse proxy can serve over tens of millions of HTTP requests per day (that’s a few hundred per second) on a *single server*. At peak load it uses about 15MB RAM and 10% CPU. Under the same kind of load, apache falls over (after using 1000 or so processes and god knows how much RAM), pound falls over (too many threads, and using 400MB+ of RAM for all the thread stacks), and lighty *leaks* more than 20MB per hour (and uses more CPU, but not significantly more). Used by wordpress.com for high performance.

1. Handling of static files, index files and auto-indexing
2. Reverse proxy with caching
3. Load balancing
4. Fault tolerance

5. SSL support
6. FastCGI support, with caching.
7. Name- and IP-based virtual servers

8. FLV streaming
9. MP4 streaming, using the MP4 streaming module
10. Web page access authentication
11. SMTP, POP3 and IMAP proxy
12. STARTTLS support
13. SSL support

3.Pound is a lightweight open source reverse proxy program suitable to be used as a web server load balancing solution. Developed by an IT security company, it has a strong emphasis on security. Using regular expression matching on the requested URLs, Pound can pass different kinds of requests to different backend server groups.

1. Detects when a backend server fails or recovers, and bases its load balancing decisions on this information: if a backend server fails, it will not receive requests until it recovers
2. Decrypts https requests to http ones

3. Rejects incorrect requests
4. Can be used in a chroot environment
5. Has no special requirements concerning which web server software or browser to use

6. Supports virtual hosts

4.Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. Good for even static content too. Varnish supports load balancing using both a round-robin and a random director, both with a per-backend weighting. Basic health-checking of back ends is also available.

5.Perlbal is a Perl-based reverse proxy load balancer and web server. The program is usually used by large web sites, to distribute the load over a number of servers. Perlbal also features a so-called "re-proxy" mechanism.

References:

http://www.ruby-forum.com/topic/96361
http://en.wikipedia.org/wiki/Reverse_proxy

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Get BIOS, FIRMWARE And Installed Drivers Details

    0 comments

    How to get the BIOS (Basic Input Output System) information and other information such as
    1.Hardware
    2.CPU information
    3.Drivers installed in Linux machine.


    For every operation/work in Linux there will be one command, this is true.(all you need to find out that command is use. Google to get it). So how to get BIOS info without rebooting the system. The command for this is dmidecode(DMI table decoder). Some times BIOS is called as DMI too. Just execute the command, It will just dump lots and lots of information about the sytem.

    #dmidecode
    To get more presised/cliped information for particular category such as only BIOS or only hardware or only RAM details or just only CPU info we have to specify the type(--tyep or -t option), here are the types list for your reference.

    DMI TYPES
    The SMBIOS specification defines the following DMI types:

    Type Information
    ----------------------------------------
    0 BIOS
    1 System
    2 Base Board
    3 Chassis

    4 Processor
    5 Memory Controller
    6 Memory Module
    7 Cache
    8 Port Connector

    9 System Slots
    10 On Board Devices
    11 OEM Strings
    12 System Configuration Options
    13 BIOS Language
    14 Group Associations
    15 System Event Log
    16 Physical Memory Array
    17 Memory Device
    18 32-bit Memory Error
    19 Memory Array Mapped Address
    20 Memory Device Mapped Address
    21 Built-in Pointing Device
    22 Portable Battery
    23 System Reset
    24 Hardware Security
    25 System Power Controls
    26 Voltage Probe
    27 Cooling Device
    28 Temperature Probe
    29 Electrical Current Probe
    30 Out-of-band Remote Access
    31 Boot Integrity Services
    32 System Boot
    33 64-bit Memory Error
    34 Management Device
    35 Management Device Component

    36 Management Device Threshold Data
    37 Memory Channel
    38 IPMI Device
    39 Power Supply


    Here is some examples.
    Note : In RHEL4 there are no options for dmidecode command.

    To find only BIOS info

    #dmidecode –t 0
    [root@test ~]# dmidecode --type 0
    # dmidecode 2.7
    SMBIOS 2.5 present.

    Handle 0x0000, DMI type 0, 24 bytes.
    BIOS Information
    Vendor : Phoenix Technologies, LTD
    Version : MS7352 1.14
    Release Date : 09/03/2008
    Address : 0xE0000
    Runtime Size : 128 kB
    ROM Size : 1024 kB
    Characteristics:
    ISA is supported
    PCI is supported
    PNP is supported
    APM is supported
    BIOS is upgradeable
    BIOS shadowing is allowed
    Boot from CD is supported
    Selectable boot is supported
    BIOS ROM is socketed
    EDD is supported
    5.25"/360 KB floppy services are supported (int 13h)
    5.25"/1.2 MB floppy services are supported (int 13h)
    3.5"/720 KB floppy services are supported (int 13h)
    3.5"/2.88 MB floppy services are supported (int 13h)
    Print screen service is supported (int 5h)
    8042 keyboard services are supported (int 9h)
    Serial services are supported (int 14h)
    Printer services are supported (int 17h)
    CGA/mono video services are supported (int 10h)
    ACPI is supported
    USB legacy is supported
    LS-120 boot is supported
    ATAPI Zip drive boot is supported
    BIOS boot specification is supported
    Function key-initiated network boot is supported
    Targeted content distribution is supported
    BIOS Revision: 1.14
    Even we can specify keyword for specifying type if you forget the type number, so just type the keyword to check particular property of the styem.

    Keyword Types
    ------------------------------
    bios 0, 13
    system 1, 12, 15, 23, 32
    baseboard 2, 10
    chassis 3
    processor 4
    memory 5, 6, 16, 17
    cache 7
    connector 8
    slot 9

    Suppose we want to see system details

    [root@test ~]# dmidecode --type system
    # dmidecode 2.7
    SMBIOS 2.5 present.


    Handle 0x0001, DMI type 1, 27 bytes.
    System Information :
    Manufacturer : Hewlett-Packard
    Product Name : HP Compaq dx7400 Microtower
    Version:
    Serial Number: SGH83801NJ
    UUID: 809AF9C0-17F0-1310-9511-C4681D1F835D
    Wake-up Type: Power Switch
    SKU Number: GD384AV
    Family: 103C_53307F

    Handle 0x0024, DMI type 32, 11 bytes.
    System Boot Information
    Status: No errors detected

    [root@test ~]#

    Some other useful commands to get system info are

    To get CPU info
    #cat /etc/cpuinfo


    To get HW info
    #lshal

    or
    #lshw

    To get PCI info
    #lspci

    To get USB info
    #lsusb
    Please comment your thoughts about this post.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • How To Use VNSTAT To Monitor Bandwidth Usage.

    0 comments

    There are so many tools to monitor network such as MRTG, now I am going to explain such tool which monitors bandwidth for a system, ie vnstat(view network statistics). Its very much easy to install and configure.

    This tool can give you full details about how much bandwidth used on the basics of,

    Per month.

    Per week.

    Per day.

    Per hour.

    Per second.

    Even we can see live traffic. This is awesome tool .

    So all the tools will not only have advantages but also disadvantages, here are they:
    1)Can not monitor multiple interfaces at a time.
    2)Can not monitor remote host.
    3)Can not monitor per host statistics(which is verymuch useful to find the network hogger, if you want per host bandwidth analyser then use iptables counters for it).

    Before configuring vnstat, one thing we have to keep in mind that vnstat is a aggregating tool which is required to run at regular intervals to monitor network bandwidth. So by default when we install vnstat a cron job is created at /etc/cron.d folder.

    Step1 : installing vnstat

    #rpm –ivh vnstat-1.6-2.fc9.i386.rpm

    Step2 : Configuring vnstat.
    As I mention earlier that vnstat is an aggregate tool so it should run background by using crontab, So first edit the cron job

    Vi /etc/cron.d/vnstat
    */5 * * * * vnstat /usr/sbin/vnstat.cron
    Add the above line to the file, then save it and exit.

    Step3 : Specifying which interface to monitor

    #vnstat –I interfacename

    Example :
    [root@test ~]# vnstat -i eth0
    Error :
    Unable to read database "/var/lib/vnstat/eth0".
    eth0: Not enough data available yet.

    Don’t worry about error intitially it will show error because it’s the first time you are executing that command, so it has to create DB.

    Step4 : Monitoring bandwidth with different intervals

    Type1 : For live traffic

    #vmstat –l
    -l is nothing but live
    Example:
    [root@test ~]# vnstat -l
    Monitoring eth0... (press CTRL-C to stop)
    rx: 8.32 kB/s 30 p/s tx: 0.19 kB/s 0 p/s
    eth0 / traffic statistics
    rx tx
    --------------------------------------+----------------------------------------
    bytes 206 kB 4 kB
    --------------------------------------+----------------------------------------
    max 11.19 kB/s 0.24 kB/s
    average 7.96 kB/s 0.19 kB/s
    min 6.35 kB/s 0.11 kB/s
    --------------------------------------+----------------------------------------
    packets 695 16
    --------------------------------------+----------------------------------------
    max 61 p/s 2 p/s
    average 26 p/s 0 p/s
    min 9 p/s 0 p/s
    --------------------------------------+----------------------------------------
    time 26 seconds

    Type2 :For monitoring traffic per second

    #vmstat –tr 5
    This command will monitor bandwidth for 5 seconds and give you the output.

    Type3 : For hourly

    #vmstat –h

    Example :
    [root@test ~]# vnstat -h
    eth0 21:00
    ^ r
    r
    r
    r
    r
    r
    r
    r
    r
    r
    -+--------------------------------------------------------------------------->
    22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21
    h rx (kB) tx (kB) h rx (kB) tx (kB) h rx (kB) tx (kB)
    22 0 0 06 0 0 14 0 0
    23 0 0 07 0 0 15 0 0
    00 0 0 08 0 0 16 0 0
    01 0 0 09 0 0 17 0 0
    02 0 0 10 0 0 18 0 0
    03 0 0 11 0 0 19 0 0
    04 0 0 12 0 0 20 12,614 41
    05 0 0 13 0 0 21 0 0
     
    Type4:For dialy

    #vmstat –d
    Example :
    [root@test ~]# vnstat -d
    eth0 / daily
    day rx tx total
    ------------------------+-------------+----------------------------------------
    09.09. 12.32 MB 41 kB 12.36 MB %%%%%%%%%%%%%%%%%%%%%%%%%
    ------------------------+-------------+----------------------------------------
    estimated -- -- --

    Type5 : For weekly

    #vmstat –w

    Example :
    [root@test ~]# vnstat -w
    eth0 / weekly
    rx tx total
    ----------------------------+---------------+--------------
    last 7 days 12.32 MB 41 kB 12.36 MB
    current week 12.32 MB 41 kB 12.36 MB
    ----------------------------+---------------+--------------
    estimated -- -- --

    Type6 : For monthly
    #vmstat –m
    Example :
    [root@test ~]# vnstat -m
    eth0 / monthly
    month rx tx total
    -------------------------+--------------+--------------------------------------
    Sep '09 12.32 MB 41 kB 12.36 MB %%%%%%%%%%%%%%%%%%%%%%
    -------------------------+--------------+--------------------------------------

    Please comment your thoughts about VNSTAT.

  • Like the post? Please Subscribe to free RSS feed to get updates
  • Archive

    Translate this page

     

    The Linux Juggernaut | Copyright 2006-2009 Surendra Kumar Anne | Surendra's Home Page | Give us feedback how we are doing, Click here