SteeltoeOSS / Steeltoe

.NET Components for Externalized Configuration, Database Connectors, Service Discovery, Logging and Distributed Tracing, Application Management, Security, and more.
https://steeltoe.io
Apache License 2.0
1.01k stars 163 forks source link

DynamicLogging in a distributed environment #164

Open DOMZE opened 4 years ago

DOMZE commented 4 years ago

Hello,

Currently the Dynamic loggers have their log levels stored in memory in the application. If the application is load balanced, changing the log level through the management endpoint will change the log level on the instance that the load balancer sent the request to.

How would you guys deal with having multiple instances behind a load balancer?

Is it something you guys have a solution for already or would something would be needed to be added to the code in the loggers?

Thank you!

TimHess commented 4 years ago

Hi @DOMZE,

That's a good question... As it stands today, we don't have an integrated solution for broadcasting log level changes across app instances. I would expect #15 to help here, but that will require a Spring Cloud Config Server. I think it would be fair for #133 to keep this use case in mind.

As far as solutions that exist outside of Steeltoe today, if you're running your apps on the Pivotal Platform, I believe Apps Manager handles distributing the log level changes across all running instances. Spring Boot Admin may do the same, but its not a scenario I've personally tested