Answer the question
In order to leave comments, you need to log in
Is it advisable to move logging to a separate database?
Now we have started to track the change of any models and log it to the database. For example, track all user actions. The database swells and it becomes a problem for a backend developer to download a dump of the database for local development. And it is also undesirable to expose the main base to an extra load.
Is it advisable to keep logging in a separate database?
In this situation, we use Laravel
Answer the question
In order to leave comments, you need to log in
And what's the catch? There are no problems with this, if the logs load the database, then use a separate one. And not even a classic database, but MongoDB, for example, or other tools.
PS Well, making copies, why not exclude tables when selecting? Plus, there are other solutions for the developer, such as test cases (Laravel has a tool for that ).
You can create a slave replica - and take a dump from it. Then there will be no load on the prod. Another thing is that it is not at all clear why developers are allowed to dump the production for local development. Developers should not have access there in general (only responsible persons). For local development, a dump should be specially prepared, and it is desirable that it contains fake data or anonymized data (for example, user emails are replaced with fake ones).
Probably, in general, logging in a SQL database is not a very good idea.
I recommend you MongoDB. This is a no-SQL solution, generally focused on event registration. Less load on the server, less problems with deploying updates to prod.
Something no one offers a cool option with an elastic ....
I'll be the first.
For development, the base must be deployed from migrations, i.e. there should be no dependence on the seller. If you're not using them, then it's time to start. In order not to write them all from scratch, dump the structure and deploy it, and the new changes are already in the migrations. Fill in the data necessary for development and testing with fixtures.
As for the logs in the database, you need to understand how you use them, and based on this, choose a solution.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question