Closed H0llyW00dzZ closed 1 week ago
Regarding the philosophy behind this Feature Request, it's inspired by the Unix philosophy of writing programs that do one thing and do it well. By refactoring the Redis connection and addressing the EOF error, we are ensuring that this specific component of the application is functioning correctly and reliably, adhering to the principles of modularity and simplicity.
@H0llyW00dzZ I think you can implement this one together with #230
I propose that you close #227, as I see you have already implemented TLS here. That way, we can cover the complete Redis config in one PR and one release
@H0llyW00dzZ I think you can implement this one together with #230
I propose that you close #227, as I see you have already implemented TLS here. That way, we can cover the complete Redis config in one PR and one release
Later -> https://github.com/Melkeydev/go-blueprint/issues/230#issuecomment-2089395976.
Currently, I am still testing the performance of using multiple databases in production, specifically MySQL and Redis. So far, it has been stable.
Has been up 17 days, 20 hours, 4 minutes, 44 seconds
Tell us about your feature request
The current Redis environment and the way it connects keeps showing an EOF error during initialization. This issue needs to be addressed to ensure a stable and reliable connection to the Redis server.
Current Behavior When running the application, the following error is encountered:
Code Snippet The current implementation of the Redis connection is as follows:
Proposed Solution To resolve the issue, the Redis connection needs to be established with the appropriate TLS configuration. By adding the
TLSConfig
option with the minimum TLS version set totls.VersionTLS12
, the connection was successfully established.Here's the corrected code:
Additionally, a connection test has been added to ensure that the Redis connection is established successfully before proceeding with the application.
Testing The following code was used for testing the Redis connection during initialization:
With the updated code and the added TLS configuration, the Redis connection is now established successfully, and the ping response is logged as expected.
Log:
Disclaimer