Re: Best practice for health check URL?

2021-12-07 Thread Thiago H. de Paula Figueiredo
On Mon, Dec 6, 2021 at 1:25 PM JumpStart < geoff.callender.jumpst...@gmail.com> wrote: > I think you’d want to make it a configuration option, so that development > can still come up quickly, but that sounds great for production. > Yes, my mental plan is to have it configurable, probably on by

Re: Best practice for health check URL?

2021-12-06 Thread Dmitry Gusev
Hi Geoff, I extracted all the important bits from our implementation into this gist: https://gist.github.com/dmitrygusev/486ad56174450299b94cc364d3630b28 I'd start exploring it from here: https://gist.github.com/dmitrygusev/486ad56174450299b94cc364d3630b28#file-eagerloadresourceimpl-java-L94

Re: Best practice for health check URL?

2021-12-06 Thread JumpStart
I think you’d want to make it a configuration option, so that development can still come up quickly, but that sounds great for production. I’ve spent some time bouncing between Dmitry and Ben’s approaches. With the latter I simplified it with Jsoup, but there are considerable limitations to

Re: Best practice for health check URL?

2021-12-03 Thread Thiago H. de Paula Figueiredo
Hi! Today I started wondering about how we could get Tapestry to run under Quarkus.io, including generating a native executable. Of course, this won't include bytecode generated in runtime, something many libraries and frameworks do, Tapestry very much included. Then I researched a bit and found

Re: Best practice for health check URL?

2021-11-30 Thread JumpStart
Hi Ben, This is all truly great to know. I think I may draw ideas from both yours and Dmitry’s response. Thank you, Geoff > On 30 Nov 2021, at 4:40 pm, Ben Weidig wrote: > > Hi Geoff, > > we have a multi-tenant/-domain multi-language site that required pre-heated > servers after

Re: Best practice for health check URL?

2021-11-30 Thread Dmitry Gusev
Hi Geoff, RESTEasy services are singletons, so we simply created an `AtomicReference` field and used `compareAndSet()`, something like this: private final AtomicReference warmUpStatus = new AtomicReference<>(WarmUpStatus.EMPTY); @Override public Response warmUp() { if

Re: Best practice for health check URL?

2021-11-30 Thread Ben Weidig
Hi Geoff, we have a multi-tenant/-domain multi-language site that required pre-heated servers after deployment, so we created a WarmupTaskRunner to run at startup, which gets contributed different kinds of tasks. They can either be blocking or just run in the background, depending on what they do

Re: Best practice for health check URL?

2021-11-29 Thread JumpStart
Hi Dmitry, That is spectacularly helpful! We’re about to write a headless smoke test anyway that will visit every page. Do you see any downside to using that to do the warmup? Where do you keep your shared “warmup in progress” flag so that it is rapidly accessible on every health check

Re: Best practice for health check URL?

2021-11-29 Thread Dmitry Gusev
Hi Geoff, I don't think there's a simpler way, we're doing something similar. We created a REST endpoint with tynamo-resteasy which is effectively a load balancer health check. On the first hit it starts the warmup process on the same request, following requests return an error instantly if the

Best practice for health check URL?

2021-11-29 Thread JumpStart
Any suggestions on best ways to write a “health check” page to be called by load balancers? My app is getting big, and the traffic is big. If the app fails (hopefully never, but it’s a JVM) and the traffic is heavy enough, startup never seems to complete - every request times out, the app log