From: Harold Lockhart <hal@platsol.com>
Subject: Re: IP changes on a DCE client machine
Date: 1997/01/28 [thread overview]
Message-ID: <32EE4B2D.2854@platsol.com> (raw)
In-Reply-To: 5cium1$iql@athos.cc.bellcore.com
David Ruddock wrote:
>
> In article <32E8F368.685F@uswest.com>, "Jeffrey L. DeMent" <jdement@uswest.com> writes:
> |> In my DCE cell, one of my application servers and a DCE client got
> |> a new IP yesterday. All the server application CDS entries now have
> |> two binding entries (one for the old IP, one for the new).
In my view, this is an application BUG. Whether you subscribe to the
"export on startup" school of thought, or the "export on install" school
of thought, every application should provide the means of removing its
bindings (including group entries if any) as a matter of routine
procedure.
If the application exports bindings on startup it should unexport before
shutting down. This means any type of shutdown, including handling
exceptions and fatal signals.
If the application exports bindings on install, via a program or dcecp
script it should also provide a program or script to unexport.
This should be a required part of the application and should be tested
as a part of the handoff to production. If you received a database
application from development, would you be expected to create the
database schema by hand?
> |> - The stale bindings in CDS (with the old IP) will just stay there
> |> forever and I as cell_admin will have to do out there manually
> |> and remove them one by one. HP's cdsbrowser makes this a little
> |> easier but it's still a manual, 1-by-1 effort.
> 1) You can't always count on the cache being up to date.
> This is especially true during initial application deployment
> when the servers are constantly coming up and down.
> (Believe me I've lived through this for 2 applications)
Sounds like you could use a little better testing ;-)
> 2) Eventually, as you point out, CDS becomes a mix of
> valid and bogus information.
In a development environment I grant this is likely to be true, but this
is not acceptable for a production environment.
> To solve this problem I have created my own library routine that:
> 1) creates an import context
> 2) "enhances" the context with a call to rpc_ns_mgmt_handle_set_exp_age
> to bypass the cache (second parameter set to 0).
> 3) imports all (within reason) binding handles for a given CDS entry.
> 4) create a thread for each binding handle that issues a
> rpc_mgmt_is_server_listening call to see if the server is active.
> 5) returns the binding handle of the first server that says it is up
> back to the caller.
>
> This procedure avoids the above problems with CDS
> and is usually faster than serial testing each binding handle
> returned by CDS.
While I concede that this is a practical solution that may be applicable
in limited environments, I see a number of difficulties with this
approach. Some of the difficulties:
o This may interfere with application specific schemes for load
balancing, priority selection via profiles, etc.
o This scheme may limit scaling by generating a lot of extra traffic all
of the time to detect a condition that (ideally) happens rarely.
o It imbeds the control of binding in relatively inaccessable client
code rather than maintaining it in the directory service where it can be
centrally managed to optimize the overall use of resources.
I would prefer a management process running in the background that
detects stale bindings and (based on a policy database) either zaps them
or takes action to restart the servers (either autonomously or by
notifying a human being).
The stale cache entry problems need to be analyzed on a per application
basis. I believe the CDS cache was designed with multi-user client
systems in mind. But multi-user clients are the exception today. In a
typical application where a client finds a server and sticks with it,
perhaps even setting up a context handle, it probably makes sense to
bypass the cache all of the time.
In other applications, for example where rebinding is done on every RPC,
perhaps to maximize load distribution, it may make sense to bypass the
cache the first time and use it thereafter. (Note, all entries fetched
from CDS will be cached, not just the one that was used.) If the same
application is restarted repeatedly, or multi-user clients are used, it
may make sense to use the cache every time.
In applications that use binding entries as a means of communication,
for example the Chat application in my book, or DEC's Resource Broker
the cache should be bypassed every time.
I don't want to let the DCE developers off the hook, however. In
general, distributed environments need to be a lot smarter and learn
from experience when the network is slow versus down. (Anybody who
surfs the Web much realizes this is not a DCE-specific problem.) DCE
also needs better tools to detect and eliminate stale cache entries.
As a final note, I have always wanted to experiment with comparing the
"is_server_listening" approach to one of setting the comm timeout to
zero (or one) and just doing the RPC on an unbound binding handle. One
step that David did not mentions is that before doing the "is_listening"
call, it is necessary to call rpc_ep_resolve_bindng(). When you do an
RPC with an unbound binding handle, the endpoint mapper fixes up the
binding and then hands off the RPC directly to the server. Calling
"is_listening" first generates 2 extra pairs of messages. Note that in
Jeffery's situation, the "resolve" call will fail and the "is_listening"
will not be done for the stale enties.
If anyone has done this experiment or would like to do it, I would be
very interested to hear the results. Note that the behavior of TCP and
UDP will be quite different.
Regards,
Hal
=================================================================
Harold W. Lockhart Jr. Platinum Solutions Inc.
Chief Technical Architect 8 New England Executive Park
Email: hal@platsol.com Burlington, MA 01803 USA
Voice: (617)273-6406 Fax: (617)229-2969
=================================================================
next prev parent reply other threads:[~1997-01-28 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-01-24 5:00 IP changes on a DCE client machine Jeffrey L. DeMent
1997-01-25 5:00 ` Michael L. Wierzbinski
1997-01-27 5:00 ` David Ruddock
1997-01-28 5:00 ` Harold Lockhart [this message]
1997-01-28 5:00 ` Rainer Freis
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox