Using Multiple Databases in Rails 6 to Log Access Requests
17-Sep-2020 2579
Imagine a situation where you need to log every attempt at accessing your application regardless of how many application servers are deployed and when. Text logs aren’t enough and can be difficult to aggregate across multiple disparate filesystems. Not to mention, retrieval of any given text-based record (or series thereof) after several years can be a significant undertaking. So you decide to log that information in your application database. But how do you scale the data storage for logs independently of data storage for your application?We encountered this situation recently while working on a medical API to be consumed by a custom built mobile application. Targeted for deployment in the United States, the law known as HIPAA – the Health Insurance Portability and Accountability Act – will require us to log all attempts to access PHI, or protected health information.
Using Multiple Databases in Rails 6 to Log Access Requests #ruby #rubydeveloper #rubyonrails #Using #Multiple #Databases #Rails #Access #Requests #databases https://rubyonrails.ba/link/using-multiple-databases-in-rails-6-to-log-access-requests