Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

[SF] Standup 4/25/2012: Haproxymations

Onsi Fakhouri
Wednesday, April 25, 2012

Ask for Help

What’s the best way to think about redirects for API calls? e.g. You post to create an object, what should you get in return?

The crowd: Some concensus emerged around: send back a 201 with a location header pointing to the url for the object and a body containing the object itself.

Mongoid’s atomic operations don’t trigger hooks (before_save, after_save, etc…)

The crowd: Crickets…

haproxy, like nginx, can pass http connection through with the header ‘X-Forwarded-For’ set so that it is possible for the app to know the original client IP. But haproxy doesn’t have support for serving as an SSL endpoint, so https:// connections are proxied in tcp mode instead of http mode. And no headers can be added because the request remains encrypted.

Some solutions:

  • Terminate the SSL connection in front of haproxy. PIvots suggested doing this via an additional nginx instance. Online resources show how to do this using stunnel. (http://www.completefusion.com/ssl-load-balancing-with-haproxy-and-stunnel-on-debian/)

  • Use nginx as the load balancer and discontinue using haproxy, or find a load balancer that fully supports SSL.

  • Build HAProxy with TPROXY support. http://blog.loadbalancer.org/configure-haproxy-with-tproxy-kernel-for-full-transparent-proxy/

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Cody says:

    The Bump guys released STUD which they use as an SSL/TLS terminator.

    https://github.com/bumptech/stud

    April 26, 2012 at 10:27 am

Add New Comment Cancel reply

Your email address will not be published.

Onsi Fakhouri

Onsi Fakhouri
San Francisco

Recent Posts

  • Cocktail: DRY up your backbone code with mixins
  • Coccyx: plug up those backbone leaks
  • [SF] Standup 4/26/2012: Hush Terminal, Hush
Subscribe to Onsi's Feed

Author Topics

backbone (2)
javascript (2)
agile (12)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >