Forum Discussion
Create HTTP Header from URI then Load Balance Off Of HTTP Header
Hi,
Doesn anyone know if it's possible to create an HTTP header from the URI of a PUT request and then load balance off of the HTTP header inserted into the request? The goal would be to always route the request to the same server in a pool but the catch is that the URI will always be a random file name. We need to solve a concurrency issue in handling files when servers make API calls to an internal service.
Example: PUT /api/1/blah123
X-New-Header: blah123
Route all subsequent requests (both PUT and DELETE) to server 1 based off of "X-New-Header: blah123"
PUT /api/1/blah456
X-New-Header: blah456
Route all subsequent requests (both PUT and DELETE) to server 2 based off of "X-New-Header: blah456"
1 Reply
- IanB
Employee
Yes, it is possible to do that, but I think you're overthinking the problem.
Using 'Insert cookie' persistence would likely do what you need - the BigIP inserts a cookie before the reply gets sent to the client, which contains the IP address and port of the pool member it came from. The client then presents that cookie in all subsequent requests, and the BigIP persists on it.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com