DEV Community

ADONIS SIMO
ADONIS SIMO

Posted on

How to reduce DNS query response time ?

Hi, I am facing a kind of weird issue with my backend api, all the query i send to it with a tool like Insomnia REST client or raw python code using requests lib take ~77sec to reach the server and return a response, but it is fast when i do the same query from the frontend app (via API Calls).

I tried this command from a forum, it seem related to the DNS.

Alt Text

My API is hosted on AWS (ECS) and everything is behind an Application Load Balancer, when i check the stat (Target Response Time, etc) everything is normal, i mean response are in average 400ms, that makes me think the issue is with the DNS system.

Thanks

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay