← All tags

Force nginx to refresh DNS in proxy pass

· 3 min read

While implementing reverse proxy in nginx, the IP address of upstream is cached by nginx. This becomes a problem when the upstream server changes its IP address. This post explains how to force nginx to refresh DNS in proxy pass.

#tinkerings

Correctly using state in setInterval with Hooks

· 4 min read

Recently, I ran into a problem while using setInterval in React. The function you pass to setInterval is defined once and it closes over the old value of your component state. This becomes a problem when you want to use the state to determine whether to clear the setInterval. Read on to find out the solution that worked for me.

#tinkerings #React

Build your own Basic Web Server using Python

· 5 min read

This post explores what web servers are and how you can develop one by yourself. The best way to learn about a software system is to develop it from scratch, which is exactly what we will be doing in this post. Dive in to know more about web servers and how you can create a basic one yourself!

#tinkerings #learnings #Python
← Back to all posts