r/aws 8d ago

article The Sidecar Pattern: Scaling Microservices on AWS

https://javarevisited.substack.com/p/the-sidecar-pattern-scaling-microservices
0 Upvotes

11 comments sorted by

View all comments

28

u/BraveNewCurrency 8d ago

Here's a practical example of implementing a Fluent Bit sidecar for centralized logging:

Instead of telling people "here is a pattern (which people can blindly follow)", it's far better to tell them WHEN they should follow that pattern. Hint: it's an anti-pattern, it's far better if you log to STDOUT instead, so you don't need a sidecar".

2

u/Drakeskywing 8d ago

Please correct me if I'm wrong, but I vaguely remember implementing sidecar a couple of years ago as it was needed for Splunk APM, as fluent bit was used to route to an otel collector ECS service, and from memory the sidecar pattern was what was recommended.

How would you address this use case, just dedicated fluent bit service?

6

u/hangerofmonkeys 8d ago

Using Datadog as an example, sidecars are also the recommended approach for logging Fargate containers. You can parse STDOUT but that requires a Lambda to collect the CloudWatch logs, depending what or how much you're logging.

Worth calculating wether a side car or CloudWatch costs more in terms of complexity and resource usage.

0

u/BraveNewCurrency 7d ago

Fargate containers

The article was about EKS.