Discussion: TCP/IP
Afficher un message
Vieux 10/03/2006, 07h18   #3
DMFH
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: TCP/IP

On 2006-03-07, Walter Roberson <roberson@hushmail.com> wrote:
> In article <1141717834.523474.44920@j33g2000cwa.googlegroups. com>,
> Prince <princevictor.moses@gmail.com> wrote:
>> I working on a client/server application in EVC.
>> The client is one place and server is in another place.
>> I want to connect the client with server using TCP/IP.
>> How shall I specify the IP address of the server in the client side?
>> Where I should use the domain name or ??

>
> Using a domain name is a convenience, so that you do not need to
> change the code if the server should need to change IP address.
>
> I would use hard-coded IP addresses:
>
> - on systems that made it difficult to resolve IP addresses
> - for code that only had to survive for a short time, where the
> extra effort of setting up a Domain Name System (DNS) was not
> worth the effort


I'll respectfully disagree with the use of hard-coded IP address, as I've
faced this situation before at some firms I've worked with, and in some
cases it can wind up being a big mistake - here's a few reasons why, and
a few workarounds:

- Your application may not be of a large scope or scale now, nor may you
have plans for it to be placed into wide use, but it may become so across
time and be subject to server moves / changes as your infrastructure grows.
When it comes time to move servers or expand / change the network, you're
left with the task of manually changing configuration files, or asking
your network administrators to accommodate change through the use of NAT
or another technique, which just slows change and creates for more
complexity.

So how to get the ease of use of a hard-coded address?

- DNS can be a pain to deal with, so can local host files, and the lookup
can cost your application time when setting up the initial connection,
which, if it's a time-critical application, you may not want. Consider the
use of a local DNS cache on the host like pdnds (for Intel hosts only I
believe...), or a local instance of bind to cache DNS lookups.

- Thinking strategically forward, consider the use of a load-balancer in
the form of a commercial appliance, Open Source OS load-balancing, or even
load-balancing in a network router (Cisco IOS has these features on some
platforms), which could afford you the use of one well-known IP address
behind which you could place servers supporting your application. Moving
the application servers could then be as easy as swapping the load-balancer's
IP address. Of course, this does add another layer of complexity as well.

----
__| |_ __ / _| |_ ____ __
dmfh @ / _` | ' \| _| ' \ _ / _\ \ /
\__,_|_|_|_|_| |_||_| (_) \__/_\_\
----
  Réponse avec citation
 
Page generated in 0,07186 seconds with 9 queries