Alpha Video Training
Results 1 to 3 of 3

Thread: How to get user’s IP address when using a load balancer?

  1. #1
    Member
    Real Name
    Rick Reeves
    Join Date
    Nov 2013
    Location
    Bradenton, FL
    Posts
    43

    Default How to get user’s IP address when using a load balancer?

    Does anyone know how you can get the user’s IP address, using xbasic, when you are using a load balancer?

    We have 4 WAS all running on Zebrahost using a load balancer.

    Rick Reeves

  2. #2
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,695

    Default Re: How to get user’s IP address when using a load balancer?

    The issue here is that Request.Remote_Addr will always contain the load balancer's IP address as that is the system that is initiation the TCP/IP connection to the Application Server. This is an issue with using load balancers in general and is not specific to the Alpha Application Server.

    The solution depends on the load balancer. Many of them will add a header such as X-Forwarded-For with the original IP address. You can use a page with a5w_info() or the App Server's raw log to see if anything like this is being added. If not, the load balancer vendor's documentation or support group may be able to help you configure it to add what you'll need.

    -Lenny
    Last edited by Lenny Forziati; 04-06-2015 at 02:42 PM.

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  3. #3
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,615

    Default Re: How to get user’s IP address when using a load balancer?

    The Zebrahost balancer we use sends this along. X-Forwarded_For is in the Request.raw and Request.Headers.
    -Steve


Similar Threads

  1. Software Load Balancer for windows [Commercial]
    By Mkpatil in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 03-05-2015, 10:34 AM
  2. Tracking user IP through a load balancer
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 03-28-2014, 11:07 AM
  3. Reports, Report Server, and Load Balancer
    By Steve Workings in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 12-01-2012, 09:12 AM
  4. User Defined Function: Address Split -- problem
    By gschepp in forum Alpha Five Version 9 - Desktop Applications
    Replies: 10
    Last Post: 03-17-2009, 12:57 PM
  5. Capture IP Address of Web User
    By Charlain in forum Application Server Version 8
    Replies: 2
    Last Post: 05-18-2008, 11:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •