You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After analyzing the use case of this service more I realized that Redis would suit hs_auth better than MongoDB as the data storage technology.
Why Redis?
Performance. Redis is an in-memory key value store which means it is much faster than MongoDB which stores data on the disk. Considering the fact that auth methods on hs_auth are called pretty much whenever any call is made to any hs service, improvements in response time should lead to the performance of the entire system and, as a result, a better user experience. Though the real performance impact is yet to be determined and I will be adding more information to this issue once I've performed some tests.
Persistence. In-memory datastores usually only store the data in memory which means that when the datastore process is killed, all data is lost. Redis is different to other in-memory datastores by supporting on-disk persistence meaning that even if the host goes down, the data will not be lost.
Things to note:
Redis uses the memory rather than the disk to store data which means that a large amount of memory would be required if the amount of data to store gets large. However, in the case of hs_auth each user can create at most 2 objects on the database (the user object and a team object). Considering we will most likely never have more than 300 users, the amount of memory required to store all of hs_auth's data would be minimal.
Things to do:
Implement an interface for storing user and team objects on Redis
Update the docker setup deploy Redis instead of MongoDB
Allow the developer to choose wether to use Redis or MongoDB (low priority)
The text was updated successfully, but these errors were encountered:
After analyzing the use case of this service more I realized that Redis would suit hs_auth better than MongoDB as the data storage technology.
Why Redis?
Things to note:
Things to do:
The text was updated successfully, but these errors were encountered: