Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7427803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:38:17+00:00 2026-05-29T08:38:17+00:00

My question has two parts regarding haproxy. Question 1: The service that I am

  • 0

My question has two parts regarding haproxy.

Question 1:

The service that I am working with deals with uploading massive XML documents, and downloading results that are also pretty large. The uploaded XML documents are used by workers to generate responses, which can later be downloaded form the workers. Here is a rough setup:

–request–> http://www.domain.com –> worker(1 or 2).domain.com

http://www.domain.com is a static content server, and is also where haproxy would reside. All requests will initially come here. The static content (html, images, etc) should be served by nginx on http://www.domain.com.

However requests with specific urls such as http://www.domain.com/%5Bupload%5D/%5Bid1%5D, or http://www.domain.com/%5Bdownload%5D/%5Bid1%5D need to be served by the workers themselves. An additional catch here is that the forwarding needs to be sticky based on the url.

For example:

Suppose an XML file was uploaded to http://www.domain.com/upload/123. haproxy will see that the url contains upload and will route the request to either worker1.domain.com or worker2.domain.com. Later, when a GET request to http://www.domain.com/download/123 is made, I would need haproxy to route it to the worker that that originally served upload request with the same id (123). Basically, I cannot have the upload request for a given id go to worker1 and then download request for the same id go to worker2. Would something like this be possible using haproxy?

Question 2:

Given that I am uploading a file to http://www.domain.com/upload, and haproxy routes it to worker1.domain.com, will the entire file pass through haproxy? That is to say, while worker1.domain.com will receive the file, will haproxy also take the same bandwidth hit since it is doing the forwarding?

Thank you very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:38:19+00:00Added an answer on May 29, 2026 at 8:38 am
    1. This solution would require one backend per worker plus the load balancing backend:
      • haproxy sends all regular requests to the general backend
      • the workers set a cookie on the client
      • subsequent requests are sent to the worker-specific backends by inspecting the cookie (with hdr_sub(Cookie)), something like “use_backend worker1 if { hdr_sub(Cookie) SRV=1 }
    2. Yes, the entire file passes through haproxy. You could let the workers redirect the clients to the worker directly, in that case the client will continue using the worker. However if the worker goes down the client won’t have a way to find a different worker. Depending on your use case, having haproxy proxy the whole file isn’t a problem though, it’s very performant.

    You might be able to do the backend selection with a table but I’m not sure how. You can store things in tables in the backend and read them in the frontend, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question has two parts: #1 I have a functions.php that is filled with
The question has two parts, one of which I already have the answer for.
This question actually has two parts. The first part: I've been developing my first
my question has two parts, but they are related. Firstly - I have Contenteditable
This question has two parts. First, I need to isolate two strings of text
We need to write an application that has two parts: One side of the
My question has two parts: 1) How can I search for a sentence (e.g.,
My question has two parts. First one is: How can I include the background
I have a page that has two parts that are slower loading. As they
Two parts to this question 1) I am working with a group of six

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.