Curious about permit deployment in Fargate, Do yo...
# permit-saas
b
Curious about permit deployment in Fargate, Do you all recommend running permit as a separate instance or do you "support" (as in yay verily/best practice) running it as a sidecar on an Fargate instance?
a
Hi @Bradley Herrup, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
a
For Fargate deployments, Permit.io supports both approaches, with ​*sidecar deployment being the most common and recommended pattern*​ for production use (1) . The sidecar pattern is explicitly recommended as "the most common way to deploy the PDP locally" where "you run one PDP container next to each of your own microservices" . This approach provides zero-latency between your application and the PDP, along with improved stability and security . According to the deployment documentation, PDPs are "usually initially deployed as sidecars or within load-balanced containers using services like Fargate" (2) . The sidecar pattern is particularly beneficial because it: • Eliminates network latency between your app and the PDP (1) • Scales automatically with your application • Provides better stability with no dependency on other clouds For ECS-Fargate specifically, you'll need to configure: • Container ports:
7000
(required for PDP API) and
8181
(optional for direct OPA access) (3) • Image URI:
permitio/pdp-v2:latest
• Environment variable:
PDP_API_KEY
with your API key The best practice recommendation states that using a sidecar design pattern ensures "each application component has its own dedicated PDP, which can be independently controlled and updated" (4) . This pattern is especially beneficial for "applications that require low latency and high data reliability" .
To learn more, see the sources I considered: [[1] at Scale](https://docs.permit.io/how-to/deploy/overview) [[2] Permit.io Best Practices](https://docs.permit.io/overview/best-practices) [[3] Step-by-step guide - Deploying PDP using AWS-ECS-Fargate](https://docs.permit.io/how-to/deploy/cloud-hosts/aws-ecs-fargate) [[4] Best Practices for Microservice Authorization](https://www.permit.io/blog/best-practices-for-authorization-in-microservices)
Thanks for the feedback, glad I was helpful.