You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@solr.apache.org by Jason Gerlowski <ge...@gmail.com> on 2023/06/26 18:57:19 UTC
Deprecate Solr's "Ping" API?
Hey all,
Is Solr's "ping" API still useful for folks today?
"/admin/ping" was initially designed as a healthcheck for individual
SolrCore instances. The idea was that it could be checked
periodically by an external loadbalancer (that, presumably, was aware
not just of Solr nodes but of the topology of cores across the
cluster).
This made sense in 2012 when /admin/ping was introduced, but I'm not
so sure it still does today.
AFAICT, over time Solr usage has come to prefer node-level
healthchecks, and other APIs have sprung up to meet that need. (e.g.
the /admin/info/system and /admin/info/health endpoints commonly used
as liveness/readiness probes in Kubernetes environments).
Even SolrJ's "load-balancing" client (used by both cloud and
"standalone" deployments) relies on node-level checks. And of course
the advent and prevalence of SolrCloud have even further reduced the
need to track per-core health outside of Solr/ZK.
Does /admin/ping still have usecases that can't be met by other APIs?
Or should we consider deprecating and removing it in 10.0?
Best,
Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Deprecate Solr's "Ping" API?
Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/1/23 13:35, Jason Gerlowski wrote:
>> At one time I had an install that used the ping handler to tell haproxy
>> which replicas (not using cloud OR /replication) were down either
>> because of problems or because I wanted to explicitly take it out of
>> rotation. It worked really well for that.
>
> Curious - did you move away from this for a different approach? Or
> did the deployment itself change and make the /ping+haproxy
> combination unnecessary?
I was laid off from that job in 2018. I don't know what they did with
it after I left.
> I'm likely missing something, but that use case seems like something
> that's already covered reasonably well by the "LoadBalancing" line of
> SolrClients. LB clients keep a "dynamic" record of server health
> (based on previous requests/responses), and also allow users to
> manually add/remove servers from rotation. So at a glance at least it
> covers the key pieces of the /ping+haproxy use case?
Do the LB clients offer the option of saying "take index copy A out of
rotation" without touching the application? I can't imagine that would
be possible. That was trivially easy with a status page that I
developed for the Solr install as a whole -- it had a link where I could
do "disable" or "enable" on the ping handler for each copy of the index.
The clients in the applications had no need to be aware of multiple
copies of the index, because the load balancer handled all of that.
I had haproxy set up to use only copy A if it was available (and enabled
in the ping handler), and move to copy B if not, and last ditch was copy
C, my dev install. I could have also had it use both copy A and B, but
active/backup seemed like a better option.
Upgrades were pretty easy with that setup. I could upgrade copy B
(including a full reindex), then disable the ping handler for copy A,
and upgrade/reindex copy A. If I needed to test a config change, I
could do the change on copy B or C, without affecting the live index on
copy A. All without SolrCloud. I did have some ideas for switching to
cloud, but it would have required a substantial rewrite of the indexing
system. If I was still working there, I very likely would have done so
by now.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Deprecate Solr's "Ping" API?
Posted by Jason Gerlowski <ge...@gmail.com>.
> At one time I had an install that used the ping handler to tell haproxy
> which replicas (not using cloud OR /replication) were down either
> because of problems or because I wanted to explicitly take it out of
> rotation. It worked really well for that.
Curious - did you move away from this for a different approach? Or
did the deployment itself change and make the /ping+haproxy
combination unnecessary?
I'm likely missing something, but that use case seems like something
that's already covered reasonably well by the "LoadBalancing" line of
SolrClients. LB clients keep a "dynamic" record of server health
(based on previous requests/responses), and also allow users to
manually add/remove servers from rotation. So at a glance at least it
covers the key pieces of the /ping+haproxy use case?
Jason
On Tue, Jun 27, 2023 at 10:52 PM Shawn Heisey <ap...@elyograg.org> wrote:
>
> On 6/27/23 15:07, Mikhail Khludnev wrote:
> > It handles collection (cloud) as well. But if it's a sharded and replicated
> > collection where the healthcheck file will be created?
>
> In cloud mode the existing ping handler is not very reliable. You might
> never know which shard replica is going to actually get the ping
> request, and it's only core aware, not collection/shard/replica/node
> aware. As a result, it has the same limitations as the DIH handler does
> in cloud mode.
>
> At one time I had an install that used the ping handler to tell haproxy
> which replicas (not using cloud OR /replication) were down either
> because of problems or because I wanted to explicitly take it out of
> rotation. It worked really well for that.
>
> I think it's useful as-is for standalone mode, and I would hate to see
> it removed unless there is a plan to replace its functionality with
> something better. Extending it for cloud mode should involve the
> ability to disable health check at the collection level and the node
> level, with the health check file probably living in ZK, not on the
> disk. Disabling healthcheck would make it so SolrCloud's built-in load
> balancing would not use the disabled resource, as well as returning a
> non-200 response code from the ping handler or its replacement.
>
> Thanks,
> Shawn
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Deprecate Solr's "Ping" API?
Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/27/23 15:07, Mikhail Khludnev wrote:
> It handles collection (cloud) as well. But if it's a sharded and replicated
> collection where the healthcheck file will be created?
In cloud mode the existing ping handler is not very reliable. You might
never know which shard replica is going to actually get the ping
request, and it's only core aware, not collection/shard/replica/node
aware. As a result, it has the same limitations as the DIH handler does
in cloud mode.
At one time I had an install that used the ping handler to tell haproxy
which replicas (not using cloud OR /replication) were down either
because of problems or because I wanted to explicitly take it out of
rotation. It worked really well for that.
I think it's useful as-is for standalone mode, and I would hate to see
it removed unless there is a plan to replace its functionality with
something better. Extending it for cloud mode should involve the
ability to disable health check at the collection level and the node
level, with the health check file probably living in ZK, not on the
disk. Disabling healthcheck would make it so SolrCloud's built-in load
balancing would not use the disabled resource, as well as returning a
non-200 response code from the ping handler or its replacement.
Thanks,
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Deprecate Solr's "Ping" API?
Posted by Mikhail Khludnev <mk...@apache.org>.
It handles collection (cloud) as well. But if it's a sharded and replicated
collection where the healthcheck file will be created?
On Tue, Jun 27, 2023 at 7:20 PM Jason Gerlowski <ge...@gmail.com>
wrote:
> Thanks for chiming in Mikhail!
>
> > Then, ping has that healthcheckFile feature which lets one turn a node
> off from the pool
>
> You mean turn a "core" off, right? Not an entire node, unless I'm
> missing something? If this was a hidden LB API we could use to cordon
> particular nodes prior to restart, etc, I'd be all for keeping it.
> But AFAICT the healthcheck file that gets created is put inside of the
> specified core's data directory, so it only affects traffic to that
> specified core. (And of course, to take advantage of that at all
> users would need to have some sort of core-aware proxy/LB.)
>
> I absolutely agree though that it'd be really nice if Solr had some
> sort of node-level cordoning API. I swear I read something about that
> in a recent SIP, but can't find a pointer at the moment...
>
> Jason
>
>
> On Mon, Jun 26, 2023 at 3:31 PM Mikhail Khludnev <mk...@apache.org> wrote:
> >
> > Hello Jason,
> > I have to say my production experience is quite limited.
> > Then, ping has that healthcheckFile feature which lets one turn a node
> off
> > from the pool via Solr app level.
> > Nowadays, it should be done via LB API, but ping allows to organise a
> > rolling recycle via primitive bash script.
> >
> > Please don't consider it as an opinion, it's just a reminder. My vote
> is: 0
> >
> > On Mon, Jun 26, 2023 at 9:57 PM Jason Gerlowski <ge...@gmail.com>
> > wrote:
> >
> > > Hey all,
> > >
> > > Is Solr's "ping" API still useful for folks today?
> > >
> > > "/admin/ping" was initially designed as a healthcheck for individual
> > > SolrCore instances. The idea was that it could be checked
> > > periodically by an external loadbalancer (that, presumably, was aware
> > > not just of Solr nodes but of the topology of cores across the
> > > cluster).
> > >
> > > This made sense in 2012 when /admin/ping was introduced, but I'm not
> > > so sure it still does today.
> > >
> > > AFAICT, over time Solr usage has come to prefer node-level
> > > healthchecks, and other APIs have sprung up to meet that need. (e.g.
> > > the /admin/info/system and /admin/info/health endpoints commonly used
> > > as liveness/readiness probes in Kubernetes environments).
> > >
> > > Even SolrJ's "load-balancing" client (used by both cloud and
> > > "standalone" deployments) relies on node-level checks. And of course
> > > the advent and prevalence of SolrCloud have even further reduced the
> > > need to track per-core health outside of Solr/ZK.
> > >
> > > Does /admin/ping still have usecases that can't be met by other APIs?
> > > Or should we consider deprecating and removing it in 10.0?
> > >
> > > Best,
> > >
> > > Jason
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>
--
Sincerely yours
Mikhail Khludnev
Re: Deprecate Solr's "Ping" API?
Posted by Mikhail Khludnev <mk...@apache.org>.
Right. Ping is core (and collection, I hope) specific. It assumes a fairly
static scenario.
On Tue, Jun 27, 2023 at 7:20 PM Jason Gerlowski <ge...@gmail.com>
wrote:
> Thanks for chiming in Mikhail!
>
> > Then, ping has that healthcheckFile feature which lets one turn a node
> off from the pool
>
> You mean turn a "core" off, right? Not an entire node, unless I'm
> missing something? If this was a hidden LB API we could use to cordon
> particular nodes prior to restart, etc, I'd be all for keeping it.
> But AFAICT the healthcheck file that gets created is put inside of the
> specified core's data directory, so it only affects traffic to that
> specified core. (And of course, to take advantage of that at all
> users would need to have some sort of core-aware proxy/LB.)
>
> I absolutely agree though that it'd be really nice if Solr had some
> sort of node-level cordoning API. I swear I read something about that
> in a recent SIP, but can't find a pointer at the moment...
>
> Jason
>
>
> On Mon, Jun 26, 2023 at 3:31 PM Mikhail Khludnev <mk...@apache.org> wrote:
> >
> > Hello Jason,
> > I have to say my production experience is quite limited.
> > Then, ping has that healthcheckFile feature which lets one turn a node
> off
> > from the pool via Solr app level.
> > Nowadays, it should be done via LB API, but ping allows to organise a
> > rolling recycle via primitive bash script.
> >
> > Please don't consider it as an opinion, it's just a reminder. My vote
> is: 0
> >
> > On Mon, Jun 26, 2023 at 9:57 PM Jason Gerlowski <ge...@gmail.com>
> > wrote:
> >
> > > Hey all,
> > >
> > > Is Solr's "ping" API still useful for folks today?
> > >
> > > "/admin/ping" was initially designed as a healthcheck for individual
> > > SolrCore instances. The idea was that it could be checked
> > > periodically by an external loadbalancer (that, presumably, was aware
> > > not just of Solr nodes but of the topology of cores across the
> > > cluster).
> > >
> > > This made sense in 2012 when /admin/ping was introduced, but I'm not
> > > so sure it still does today.
> > >
> > > AFAICT, over time Solr usage has come to prefer node-level
> > > healthchecks, and other APIs have sprung up to meet that need. (e.g.
> > > the /admin/info/system and /admin/info/health endpoints commonly used
> > > as liveness/readiness probes in Kubernetes environments).
> > >
> > > Even SolrJ's "load-balancing" client (used by both cloud and
> > > "standalone" deployments) relies on node-level checks. And of course
> > > the advent and prevalence of SolrCloud have even further reduced the
> > > need to track per-core health outside of Solr/ZK.
> > >
> > > Does /admin/ping still have usecases that can't be met by other APIs?
> > > Or should we consider deprecating and removing it in 10.0?
> > >
> > > Best,
> > >
> > > Jason
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > > For additional commands, e-mail: dev-help@solr.apache.org
> > >
> > >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>
--
Sincerely yours
Mikhail Khludnev
Re: Deprecate Solr's "Ping" API?
Posted by Jason Gerlowski <ge...@gmail.com>.
Thanks for chiming in Mikhail!
> Then, ping has that healthcheckFile feature which lets one turn a node off from the pool
You mean turn a "core" off, right? Not an entire node, unless I'm
missing something? If this was a hidden LB API we could use to cordon
particular nodes prior to restart, etc, I'd be all for keeping it.
But AFAICT the healthcheck file that gets created is put inside of the
specified core's data directory, so it only affects traffic to that
specified core. (And of course, to take advantage of that at all
users would need to have some sort of core-aware proxy/LB.)
I absolutely agree though that it'd be really nice if Solr had some
sort of node-level cordoning API. I swear I read something about that
in a recent SIP, but can't find a pointer at the moment...
Jason
On Mon, Jun 26, 2023 at 3:31 PM Mikhail Khludnev <mk...@apache.org> wrote:
>
> Hello Jason,
> I have to say my production experience is quite limited.
> Then, ping has that healthcheckFile feature which lets one turn a node off
> from the pool via Solr app level.
> Nowadays, it should be done via LB API, but ping allows to organise a
> rolling recycle via primitive bash script.
>
> Please don't consider it as an opinion, it's just a reminder. My vote is: 0
>
> On Mon, Jun 26, 2023 at 9:57 PM Jason Gerlowski <ge...@gmail.com>
> wrote:
>
> > Hey all,
> >
> > Is Solr's "ping" API still useful for folks today?
> >
> > "/admin/ping" was initially designed as a healthcheck for individual
> > SolrCore instances. The idea was that it could be checked
> > periodically by an external loadbalancer (that, presumably, was aware
> > not just of Solr nodes but of the topology of cores across the
> > cluster).
> >
> > This made sense in 2012 when /admin/ping was introduced, but I'm not
> > so sure it still does today.
> >
> > AFAICT, over time Solr usage has come to prefer node-level
> > healthchecks, and other APIs have sprung up to meet that need. (e.g.
> > the /admin/info/system and /admin/info/health endpoints commonly used
> > as liveness/readiness probes in Kubernetes environments).
> >
> > Even SolrJ's "load-balancing" client (used by both cloud and
> > "standalone" deployments) relies on node-level checks. And of course
> > the advent and prevalence of SolrCloud have even further reduced the
> > need to track per-core health outside of Solr/ZK.
> >
> > Does /admin/ping still have usecases that can't be met by other APIs?
> > Or should we consider deprecating and removing it in 10.0?
> >
> > Best,
> >
> > Jason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> > For additional commands, e-mail: dev-help@solr.apache.org
> >
> >
>
> --
> Sincerely yours
> Mikhail Khludnev
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
For additional commands, e-mail: dev-help@solr.apache.org
Re: Deprecate Solr's "Ping" API?
Posted by Mikhail Khludnev <mk...@apache.org>.
Hello Jason,
I have to say my production experience is quite limited.
Then, ping has that healthcheckFile feature which lets one turn a node off
from the pool via Solr app level.
Nowadays, it should be done via LB API, but ping allows to organise a
rolling recycle via primitive bash script.
Please don't consider it as an opinion, it's just a reminder. My vote is: 0
On Mon, Jun 26, 2023 at 9:57 PM Jason Gerlowski <ge...@gmail.com>
wrote:
> Hey all,
>
> Is Solr's "ping" API still useful for folks today?
>
> "/admin/ping" was initially designed as a healthcheck for individual
> SolrCore instances. The idea was that it could be checked
> periodically by an external loadbalancer (that, presumably, was aware
> not just of Solr nodes but of the topology of cores across the
> cluster).
>
> This made sense in 2012 when /admin/ping was introduced, but I'm not
> so sure it still does today.
>
> AFAICT, over time Solr usage has come to prefer node-level
> healthchecks, and other APIs have sprung up to meet that need. (e.g.
> the /admin/info/system and /admin/info/health endpoints commonly used
> as liveness/readiness probes in Kubernetes environments).
>
> Even SolrJ's "load-balancing" client (used by both cloud and
> "standalone" deployments) relies on node-level checks. And of course
> the advent and prevalence of SolrCloud have even further reduced the
> need to track per-core health outside of Solr/ZK.
>
> Does /admin/ping still have usecases that can't be met by other APIs?
> Or should we consider deprecating and removing it in 10.0?
>
> Best,
>
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@solr.apache.org
> For additional commands, e-mail: dev-help@solr.apache.org
>
>
--
Sincerely yours
Mikhail Khludnev