Using Rayon for Simple Parallelization of SQL Queries in Rust

from blog cprimozic.net Blog, | ↗ original
While working on the API backend for my Spotifytrack application, I encountered a situation where I needed to fetch two separate pieces of data from the database and combine them both into the response. The SQL queries that returned them could sometimes be non-trivial and take nearly a second to complete, and running them both in series was...