Michael is the founder of Paraxial.io, a bot detection and prevention company focused on Elixir and Phoenix applications. He has several years of experience working in web application security, software development, and security consulting. He wants to see every Elixir and Phoenix developer have the tools they need to keep their software safe.
When your web server receives a new login request, is it from a real user, or a rented cloud server? You have a list of thousands of IP prefixes, and need a way to compare each incoming conn’s remote_ip to that list.
This problem will be used to illustrate several features of Elixir/Erlang. The beginning of the talk will introduce the problem to the audience, and show why the default Elixir data structures are not suitable. Once the radix tree has been covered, we’ll move to the problem of thousands of processes needed to access the same data structure in a short period of time.
The talk will cover GenServers, ETS, and the constant pools optimization, and why these are the wrong choice for the problem. Finally, the complete solution will be shown, using persistent_term.