-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Openshift: delete dnsmasq procces [THREESCALE-1555] #1090
Conversation
Consider this work WIP:
|
661c4db
to
2781e03
Compare
Here are the result on OP 4 series: Traffic flow: Using local address: server-service.3scalegateway.svc.cluster.local DNS server as a sidecar container in the POD:Using local address:
Using external address:
DNS server inside APICast containerUsing local DNS address:
Using external address:
Without DNS Server and without RESOLVER env variable.Using local DNS address:
Using external address:
Openshift deploy config:
|
The main reason we had dnsmasq was to cope with unreliable DNS server in the cluster. That happend on deploys or node reallocations when services / pods moved around the cluster. Also the time (20s) might not be enough to do a second resolve during the test. It is necessary to have several resolvs in one test to see if there is any impact. |
Ok,
What is a good test then? running wrk and kill all DNS servers in the cluster? Is that something that Apicast should be aware of?
The
Kubernetes already fix this using services, no? Resolv.conf is always pointing to the right DNS server:
|
A good test is running some deployment in the cluster. This used to cause timeouts on one of the two resolvers. But if /etc/resolv.conf has just one server now, then it is not necessary. It used to have two. I see. The test runs for 100 seconds. What is the DNS reply TTL then? I meant "resolvs" in a sense of making multiple DNS queries over the course of the test. |
Hi, For the track, I had a chat with Michal, and some issues are still present, the There are still two pending issues: Resty cache queries:If the API backend is set as the
This can be fixed without too much trouble, we have the query and the search, so DNS server hangs during service updates:I tested that, increase the deploy to more replicas and no timeout at all, so I think that is already fixed. |
Hi @mikz I've just checked this, the query can be to The query will hit the search_dns as APIcast/gateway/src/resty/resolver.lua Lines 323 to 344 in 41ad2c2
And in the APIcast/gateway/src/resty/resolver.lua Lines 282 to 302 in 41ad2c2
As example: First request
Second request:
This is working as expected. To summarize:
I do not think that are any other issue, so I think that we can remove dnsmasq Best regards. |
2781e03
to
19970b1
Compare
Nice work 🏅 We should change the title and the changelog to avoid confusion, right? Because this PR does not move dnsmasq to another container it just removes it from the APIcast image. |
107ec71
to
031999d
Compare
DNSmasq process was not handled by Apicast at all, dnsmasq process can die and will never be up, so dns queries will start to fail. The reasons to have APICast were: - Openshift cluster provided multiple DNS servers in the resolv.conf: not anymore, currently is using a Kubernetes service with static IP, so all connections goes to the same service. - DNS service was block during pod updates, no longer a case, it's working correctly, added more pods in to a service and do not have the case. - Cache was not used, no longer needed due to `resolver.search_dns` is looking for the full query in the cache before make the dns request to the server. [0] Fix THREESCALE-1555 [0] https://github.com/3scale/APIcast/blob/41ad2c2a04054cd05991a65fc807a8105cdb2fd6/gateway/src/resty/resolver.lua#L282-L302 Signed-off-by: Eloy Coto <[email protected]>
031999d
to
ecdb7da
Compare
DNSmasq process was not handled by Apicast at all, dnsmasq process can
die and
will never be up, so dns queries will start to fail.
The reasons to have APICast were:
[0]
APIcast/gateway/src/resty/resolver.lua
Lines 282 to 302 in 41ad2c2
Fix THREESCALE-1555
Signed-off-by: Eloy Coto [email protected]