vuestorefront / storefront-api

Storefront GraphQL API Gateway. Modular architecture. ElasticSearch included. Works great with Magento1, Magento2, Spree, OpenCart, Pimcore and custom backends
https://storefrontapi.com
MIT License
8 stars 1 forks source link

High I/O load on DNS requests #14

Open pkarw opened 4 years ago

pkarw commented 4 years ago

What is the motivation for adding/enhancing this feature?

Original issue raised by one of the users:

I can see a lot of loooong DNS lookup on VSF API when it calls external Apis It seems to be a know problem on NodsJS because this part runs on a monothread So it wait for the first call to finish, if you have a lot of external API calls at the same it stays in the queue to be processed And at a moment he cant handle it anymore and your site is unbrowsable Its what is happening when we send a newsletter I really would like you guys take a look at this problem because it will happen with other merchants with peak traffic

Related resources:

pkarw commented 4 years ago

Probably a workaround is to uset etc/hosts to explicitly map the addresses however is of course not a final solution

pkarw commented 4 years ago

Another related article: https://stackoverflow.com/questions/51953315/docker-alpine-image-issue-with-dns-resolution-slow

jonathanribas commented 4 years ago

For information this issue is a Docker related environment. One more interesting article: https://tech.xing.com/a-reason-for-unexplained-connection-timeouts-on-kubernetes-docker-abd041cf7e02

pkarw commented 4 years ago

https://tech.xing.com/a-reason-for-unexplained-connection-timeouts-on-kubernetes-docker-abd041cf7e02