I developed a straightforward API in Elixir that retrieves the current Bitcoin block height, utilizing an in-memory cache with Cachex and initially a Cowboy web server, which was later replaced by Bandit. The data is sourced from the Mempool. Deployed on an Intel High Performance VPS from Vultr, equipped with a single core and 2GB of RAM, the API achieved a performance of 3,424 requests per second. The response times were impressive, with an average of 46ms, a minimum of 3ms, and a 95th percentile of 104ms.
The results are noteworthy, especially considering the use of just one processing core. However, Elixir is a language designed for multithreading, capable of leveraging all available cores. When tested on a Ryzen 5 processor with 12 threads, the API's performance skyrocketed to 25,545 requests per second.
For those unfamiliar with Elixir, it is a robust programming language designed for building systems that can handle a high volume of concurrent requests while ensuring high availability and resilience to failures. It is widely used in industries such as telecommunications, payment processing systems like Stone, and chat applications like Discord.
https://lnkd.in/daTS48EU
#Elixir
Software Engineer | Java | GoLang | AWS
2wI think this https://openjdk.org/jeps/475 has correlation with the last talk of Bruno Borges