Have an interesting task when I don't want to have a full rollout of a new feature. I'd like to route only the percentage of traffic (based on a path parameter) to the new endpoint.
I'd like to calculate the percentage based on a 'specialPathParam': ourservice.com/one/'specialPathParam'/something .
So, if we want to route 50% to the new endpoint:
if there're 2 requests ourservice.com/one/'specialPathParamOne'/something ourservice.com/one/'specialPathParamTwo'/something ,
one request with 'specialPathParamOne' should go to the new endpoint and another one with 'specialPathParamTwo' should go to the old one.
Trying to find a way to implement it in VCL somehow...
Any tips and tricks here? Thanks a lot!