Repository navigation
Different DNS resolving based on request header #5046
Closed
aukevanleeuwen
started this conversation in
General
Replies: 2 comments 6 replies
|
yes this is possible @aukevanleeuwen , what would you like the condition to be ? |
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm new-ish to Envoy and I'm not 100% this this is the right place to ask, but here goes anyway. I might be juggling the glossary a bit, please forgive me.
I'm using Envoy Gateway and for a certain integration I'm connecting (out of the Kubernetes cluster) with an service behind Akamai. Akamai has the notion of a
stagingand aproductionnetwork. To hit the staging network of Akamai (for testing before going live with your Akamai property configuration) you would need to have basically the sameHostheader as you would send to production, same SNI server name, but connect with a different IP. Basically you would be able to locally resolve the staging network IP (more on that later), put it in your/etc/hostsfile and just fire off the request as normal and it would end up on thestagingdeployment of Akamai.This
stagingIP can be resolved as follows: your normal lookup would look something like this:Where if you want to resolve against the
stagingnetwork, you can resolve theCNAMEagainstedgekey***-staging***rather thanedgekey.net.Some example in which I've been able to automate some of this away:
In cURL you can 'automate' this a bit like this:
In Java I can override the DNS resolver roughly like this (removed some code for clarity):
I was wondering if it's possible to do something in Envoy like this as well so that traffic which has a certain header which will be send to a
clusterconnecting to Akamai can be conditionally send to either the 'normal' destination (foo.com) or to the staging destination (foo.edgekey-staging.net)?All reactions