I'm currently trying to build out an identity and ...
# talk-kratos
b
I'm currently trying to build out an identity and access control stack based on ory's software in AWS Elastic Containers Service - one thing that I need to specify while defining containers is the memory and CPU resources to allocate to each container. What kind of resource requirements does Kratos have / what CPU & memory limits make sense for it? (Tried searching the docs but didn't come up with any specific answers).
Probably relevant here; I'd like to use argon2 as the hasher
it looks like that has memory settings so I imagine it's a good idea to give kratos enough resource so that you can configure argon2 to be fairly secure
d
Hello. Have you checked this blogpost about argon setup?
Usually 1Gb of RAM is enough for Kratos for startups. It depends on requests per second
b
I have! Super useful. ๐Ÿ™‚
Nice, 1GB is pretty slim, what kind of CPU resources do you recommend? This is all cloud hosting so I'm trying to figure out a good value for # of vCPUs.
ATM I've just set it to 2, but am I better off with a different amount?
d
I think that 2vcpu is more than enough but remember to configure observability tools and get CPU/RAM metrics against the cluster. Itโ€™ll be easier for you to troubleshoot issues in case of a lack of resources.
โœ… 1
b
Yea that's good advice, thanks ๐Ÿ™‚
Can Kratos scale behind a load balanacer if I set up load balancing and scaling?
(Since I'm doing this in ECS I already need a load balancer anyway ๐Ÿ™‚)
d
Kratos can scale but AFAIK we donโ€™t have any configuration options available for AWS. You can implement it by yourself. You can easily spin-up another container
b
Nice!
d
Kratos feels good on AWS with RDS as storage for the identities and APi requests can be handled without any issues, since Kratos is stateless
b
Excellent, yea it should scale fine with my setup then, I'm looking at using RDS as you mentioned ๐Ÿ™‚
d
I started with 0.5 CPU and 512 ram using k8s and Kratos worked fine. Later we added more resources, but it depends on load average
๐Ÿ™Œ 1
b
Yea I guess there is probably a sweet spot where it scales best but it'll probably just take some dialing in to find