H
H
hellohelpme2020-10-01 10:56:32
Laravel
hellohelpme, 2020-10-01 10:56:32

How to take out storage without losing performance?

There was a monolith on laravel, we decided to slightly divide it into its component parts and it turned out like this:
1) database server + sockets
2) server front + back
3) server front + back
4) load balancer

Everything would be fine, but faced such a problem. There are encrypted SMS in the database, in the case of a monolith, the keys were in storage, there was a request to the database and decryption by the keys.

But now, when dividing a person, he throws either on the first server or on the second, the question arose that storage needs one place, such as cloud storage, but if we organize it, it turns out that 1 request will be made to decrypt 1 message from 1 correspondence, in theory, with a heavy load, the time will increase and will work longer and longer than it worked with a monolith. What are the possible ways out in this situation?

There is an idea with a cache, to make a request to get the key and cache it, is this a way out of the situation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Anton, 2020-10-01
@Fragster

You can connect something on all instances that implements the Amazon protocol, or ftp
https://laravel.com/docs/8.x/filesystem#driver-pre...
And in this case there is built-in memcached caching.

T
ThunderCat, 2020-10-02
@ThunderCat

Take out the storage separately and mount it to both servers as a folder. It's easier to backup, easier to maintain, easier to customize each server for your tasks. Well, about the division of iron into more specific for the task, do not forget.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question