Using Multiple Databases in Rails 6 to Log Access Requests
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 #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper