-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixed deployment #4016
Comments
hi @cdprete in general, there are 2 different ways for connecting admin servers with monitored apps:
For 1) there are again different ways how to handle discovery in k8s, as there are multiple client implementations. The spring-cloud-kubernetes-discoveryserver can be used if you don't want to give too many of you pods access to the k8s api, but in the end it is also just a service registry (which would be used by admin server to discover apps). We have runnable examples for all k8s variants here: https://github.com/codecentric/spring-boot-admin-runtime-playground/tree/main/kubernetes Option 2) is an alternative to discovery. The apps must use the client library and know the server urls. You can provide multiple server urls. See http://docs.spring-boot-admin.com/3.4.2/docs/client/ When you run multiple admin servers, you can also connect them to a cluster, so they share their state, see http://docs.spring-boot-admin.com/3.4.2/docs/server/server#clustering Hope this helps to sort your requirements, if you have more specific questions feel free to ask. |
Hello @erikpetzold.
How can clients know the URLs where to connect to if the server instances are just managed by a Deployment and exposed through a Service? The clients may use the URL of the Service, but then only one of the servers would receive the registration of the client X and not both.
Isn't this property just to instruct the client to send the registration once and (e.g.: similar to the Eureka) - and it's independent on the number of servers which are configured - or have I misunderstood the documenation?
I'm failing to find a suitable example on the above.
The point is more that my applications are deployed on-premise while Spring Boot Admin will be deployed on OpenShift. |
Ok, I think now I understand the problem.
I think the cleanest solution would be to use a service registry (like eureka), make the apps register themselfes there and use the discovery mechanism inside SBA Server to let the server discover the apps via the registry. If you want to stick to the "app registers at the SBA Server" pattern, then that should also work.
|
Ideally yes, but we also have applications in Perl, PHP, C++,... for which we would like to leverage the same monitoring solution.
Why is it so?
Of course, there is still the edge case that an app goes down and comes back up in the interval between one poll by the server and the next one. But, even in this case, for the server should still be transparent (ignore the registration) because - according to the last state it has about the app - this is already registered. |
Does it make a big difference if your agent is registering at Spring Boot Admin or at eureka? Should be the same effort.
That would be the more generic solution in contrast to
The app will register again and again by default (because it may be possible that the Admin Server got restartet and lost its state). So if your ingress distributes the requests to different SBA Server instances, all of them will get the registration requests over time. |
I wouldn't say so if you don't have a service registry at all to begin with. Of course, there is also the approach that the SBA server can, at the same time, be also a service registry.
In agree, in general and from a design point of view. |
Hello.
In the company where I work we've several applications deployed on VMs and/or bare metal machines.
In particular, there are always (at least) two instances running in different availability zones per application.
Given that Spring Boot Admin is a Spring Boot application, I was thinking to deploy it in OpenShift with 2 instances up and running, as well, in different availability zones.
It's clear to me, by reading the documentation, that you're able - through Spring Cloud - to discover all the clients deployed in a k8s-like cluster but what about when the clients would need to discover the servers (2 in this case) in order to find out which URL to use?
The idea is that the clients register themselves to both the servers, so that the monitoring keeps up even if one of the 2 goes down.
I think to need something in the direction of https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/#spring-cloud-kubernetes-discoveryserver in the client applications, but how does this (and if at all) connect with Spring Boot Admin Client?
I can't find any information about this use-case in the documentation and your help would be, therefore, appreciated.
The text was updated successfully, but these errors were encountered: