I would like to understand the solution for this production use case
The project will be like this
Using Appwrite with Database and Auth modules.
The final production docker environment is published as Docker Swarm service, When the volumes are bind as sshfs volumes
The MariaDB will be in external server, the redis and telegraf will be scale only once but will get higher resources usages
I have two types of function
Event driven those function will be triggered and for them I don't really mind to have high availability and for now setting the replica up to 3 seems to do the work
Direct execution these function are being using mostly between the App and the Database and are going to be execute up to 1000/req/sec for what I can see now when the appwrite main container runs on 4GB RAM and 2 vCPU is able to process only between 5-10 function at once. and if the rest of the function will be queued then it could be half-solution. But for now the rest of the functions are just being timed-out in there internal logic in the part when connection to database An internal curl error has occurred within the executor! Error Msg: Operation timed out
So I have two questions:
- Is there a way anyway (oc it won't be 100% accurate) to calculate how much resource is needed per request. ( resource = request * n / second )
- Is scaling and adding replica to the
appwritemain container is the right way to allow more function request per seconds and more database access per second.
Thanks a lot in advance 😄