Computer NetworksNETWORKS

Implementing IP Address Rate Limiting in Go!?

JOIN MY DISCORD https://discord.gg/CdFgza8y

In this video, I discuss a simple implementation of IP address caching in Golang. It covers read-write mutexes, the use of Go routines to clear up stale cache items, and how I implemented it in an endpoint on a little side project.

The IP cache is a nice and simple in-memory Go map, so it’s nice and basic and shows a use-case of maps to anyone trying to get familiar with Go.

I implemented this as a package that can be reused, so do let me know if you’d like this available as a module, I’ll put some more time into making it production ready then!

See code posts in action: https://codeposts.dev

Github: https://github.com/samverrall
Twitter: https://twitter.com/samvcodes

source

ip address

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

4 thoughts on “Implementing IP Address Rate Limiting in Go!?

  • do you store ip address in memory of API or is it better to use redis?

  • Really informative and almost perfect paced video. 👍

  • keep going sir golden content from golden man❤

Comments are closed.