And honestly for us, we'd be happy if all queries were ~20ms. :) Lots are unfortunately slower than that. Especially if all 45k/s were doing the queries.
And honestly for us, we'd be happy if all queries were ~20ms. :) Lots are unfortunately slower than that. Especially if all 45k/s were doing the queries.
I know you could roll your own implementation... but building this into the ORM would still be really slick.
IMO, the added complexity wouldn't be worth it with things like Varnish. I think there are better solutions and this is attacking the wrong problem.
But, YRMV. It depends on the situation at hand always.
I also use https://github.com/etaty/rediscala for accessing redis.
But even without async drivers for MySQL, you can still do:
val sqlResult: Future[StuffFromSql] = future {
val stmt = connection.createStatement("...")
...
}
This will tie up a thread, but you can still run other actions in parallel with it.This can cause problems if you tie up the default dispatcher with blocking SQL queries while using clustering: the cluster gossip won't be able to fire and if your failure detection settings are low, that node can be marked unreachable by the rest of the cluster.