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 ? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Works. Thanks @arkodg |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
staging
and aproduction
network. To hit the staging network of Akamai (for testing before going live with your Akamai property configuration) you would need to have basically the sameHost
header 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/hosts
file and just fire off the request as normal and it would end up on thestaging
deployment of Akamai.This
staging
IP can be resolved as follows: your normal lookup would look something like this:Where if you want to resolve against the
staging
network, you can resolve theCNAME
againstedgekey***-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
cluster
connecting to Akamai can be conditionally send to either the 'normal' destination (foo.com
) or to the staging destination (foo.edgekey-staging.net
)?Beta Was this translation helpful? Give feedback.
All reactions