I would like to ask questions about establishing a database connection (about cassandra).
Because of my architecture, combined with web and database processing (actix_web + cassandra), but such a method, the input of a url to establish a connection.
If I want to connect with cassandra always, instead of re-establishing the request every time I send it. What is the way?
I only know that using static variable (global variable), is there a better way?
In that case you don't need R2D2. Anyway, application state is one the place where you can hold connection (or some pool reference). lazy_static is an alternative one you can use instead.