Back to articles
Entry #01: My perfect API was actually drowning

Entry #01: My perfect API was actually drowning

via Dev.to JavaScriptElla

For a long time, I believed that if my API sent back a 200 OK status code, my work as a backend developer was over. But I've come to realize that I should not only be using tools and libraries but also understand how they work. I've been using Postgres because I've heard it's the best. But I never really knew why—until now. Welcome to Entry #01 of my journey into advanced backend architectures. The Life of a Query I used to think that a query goes in and comes out with the data. But the life of a query is actually very disciplined. It's like a relay race. When I send a query to my Node.js application, a connection is made (now I’m using a connection pool to keep things stable). When this connection is made, a backend process is created. Then, Postgres determines how to retrieve this information. It could do an index scan if it can find it quickly, or it could do a sequential scan if it has to look at everything. It all depends on the query One of the biggest mind blowers for me is that

Continue reading on Dev.to JavaScript

Opens in a new tab

Read Full Article
2 views

Related Articles