haproxy and protobuffers working example?

Scott M. Likens scott at likens.us
Mon May 30 19:11:23 EDT 2011


Hey,

So I thought I had a working haproxy configuration with protobuffers (It worked once upon a time, but no longer) so I was wondering if anyone had any working examples?

<quote>
irb(main):001:0> client = Riak::Client.new(:protocol => "pbc")
=> #<Riak::Client pbc://127.0.0.1:8087>
irb(main):002:0> client.ping
Riak::ProtobuffsFailedRequest: Expected success from Riak but received server_error. Unexpected EOF on PBC socket
</quote>

<quote>
irb(main):008:0> client2=Riak::Client.new(:protocol => "pbc", :host => "10.170.121.116")
=> #<Riak::Client pbc://10.170.121.116:8087>
irb(main):009:0> client2.ping
=> true
</quote>

If I remove all the servers except for 1 connects but still doesn't really work, below is my haproxy configuration I hope it helps.

  listen riak_pbc :8087
  mode tcp
  server app-0 ip-10-170-121-116.us-west-1.compute.internal:8087 check inter 5000 fastinter 1000 fall 1 weight 50
  server app-1 ip-10-171-43-226.us-west-1.compute.internal:8087 check inter 5000 fastinter 1000 fall 1 weight 50
  server app-2 ip-10-170-142-202.us-west-1.compute.internal:8087 check inter 5000 fastinter 1000 fall 1 weight 50

Actual full haproxy erb chef template can be found here https://github.com/damm/ey-riak/blob/master/templates/default/haproxy.cfg.erb (if you see anything I should turn off for http please let me know and be gentle)

Thanks!


More information about the riak-users mailing list