Can Apache BalancerMember be configured to use unix domain sockets?
Asked Answered
S

1

6

I am using the Apache Proxy balancer directive to hook up a set of thin servers (for Rails).

Like so:

  <Proxy balancer://thinservers>
    BalancerMember http://127.0.0.1:5000 route=thin0
    BalancerMember http://127.0.0.1:5001 route=thin1
    BalancerMember http://127.0.0.1:5002 route=thin2
  </Proxy>

However, thin can also be configured to use unix domain sockets.

So I want to be able to do something like:

  <Proxy balancer://thinservers>
    BalancerMember unix://tmp/thin.0.sock route=thin0
    BalancerMember unix://tmp/thin.1.sock route=thin1
    BalancerMember unix://tmp/thin.2.sock route=thin2
  </Proxy>

But Apache is not taking it. Apparently nginx can do it, but I really want to use Apache.

Is there a way?

Shoop answered 23/10, 2009 at 2:21 Comment(3)
OK, it seems that no-one here knows the answer to this. Likely the answer is no. Can anyone suggest an appropriate Apache board where I can ask this question before wrapping it up?Shoop
Maybe you should try asking on serverfault.Huertas
do you get answer on this question?Disgruntle
S
3

Short answer, no.

From http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html

It provides load balancing support for HTTP, FTP and AJP13 protocols

So those are the only protocols supported.

Spalato answered 26/5, 2011 at 2:47 Comment(2)
The protocol is independent of the type of socket used. Nginx proxies HTTP over Unix sockets.Randi
Correct. Somewhere I found a sugguestion that the socket=%2Ftmp%2Fthin.0.sock syntax might work, however I was untable make it work nor was I able to find anything related to it in the source code. Your best bet would be to reconfigure thin to listen on TCP on localhost and use it that way.Galicia

© 2022 - 2024 — McMap. All rights reserved.