about soaplib demo's time latency

S

Stephen.Wu

I just follow the instructions below - http://soaplib.github.com/soaplib/2_0/pages/helloworld.html
to establish a soap server. After starting the server, everytime I run
the client script, I fetch the response nearly 20 seconds afterward.
Why this happen?
I just want the server send response asap then the client will show
the result to me immediately.

please give some hints. thanks
 
C

Chris Angelico

I just follow the instructions below - http://soaplib.github.com/soaplib/2_0/pages/helloworld.html
to establish a soap server. After starting the server, everytime I run
the client script, I fetch the response nearly 20 seconds afterward.
Why this happen?
I just want the server send response asap then the client will show
the result to me immediately.

please give some hints. thanks

Not sure if it's what you're seeing, but you might have an issue with
reverse DNS. When the client connects, the server tries to look up its
PTR record for its log. You can speed this up by either having such a
record, or having an authoritative DNS server that returns an
immediate failure; either option is fairly easy if you run BIND, but
you might be able to do it with your hosts file (/etc/hosts or
c:\windows\system32\drivers\etc\hosts) instead - just put in an entry
for your client computer and some hostname.

Hope that helps!

Chris Angelico
 
S

Stephen.Wu

Not sure if it's what you're seeing, but you might have an issue with
reverse DNS. When the client connects, the server tries to look up its
PTR record for its log. You can speed this up by either having such a
record, or having an authoritative DNS server that returns an
immediate failure; either option is fairly easy if you run BIND, but
you might be able to do it with your hosts file (/etc/hosts or
c:\windows\system32\drivers\etc\hosts) instead - just put in an entry
for your client computer and some hostname.

Hope that helps!

Chris Angelico

Thanks Chris.
I recheck the logic line by line and I find it is this sentence drag
speed down : hello_client = Client('http://localhost:7789/?wsdl').
To initialize a suds.client.Client instance need that long lasting 20
seconds?
On your suggestion, if I just want to run the server localhost, how
should I set up the local \etc\hosts file?

thanks
 
C

Chris Angelico

Thanks Chris.
I recheck the logic line by line and I find it is this sentence drag
speed down :  hello_client = Client('http://localhost:7789/?wsdl').
To initialize a suds.client.Client instance need that long lasting 20
seconds?
On your suggestion, if I just want to run the server localhost, how
should I set up the local \etc\hosts file?

It's probably already there for localhost; check the file I named and
see if there's a line looking like:

127.0.0.1 localhost

If there is, you should be able to get reverse DNS for 127.0.0.1. The
other possibility there is that it's the _forward_ DNS that's slow
(although I don't know why it would be). Try the IP instead:

hello_client = Client('http://127.0.0.1:7789/?wsdl')

Chris Angelico
 
S

Stephen.Wu

It's probably already there for localhost; check the file I named and
see if there's a line looking like:

127.0.0.1   localhost

If there is, you should be able to get reverse DNS for 127.0.0.1. The
other possibility there is that it's the _forward_ DNS that's slow
(although I don't know why it would be). Try the IP instead:

hello_client = Client('http://127.0.0.1:7789/?wsdl')

Chris Angelico

It works. Seems the DNS server will exchange localhost and 127.0.0.1,
taking nearly 15 seconds. Anyway, I got to know the exactly reason let
the initialized procedures down, which is the most important thing.
Thanks again.
 
C

Chris Angelico

It works. Seems the DNS server will exchange localhost and 127.0.0.1,
taking nearly 15 seconds. Anyway, I got to know the exactly reason let
the initialized procedures down, which is the most important thing.

Generally BIND, on install, is configured to be authoritative for the
..localhost domain (little-known trivia fact: localhost isn't a machine
name, it's a top-level domain - on par with .com or .uk), which should
mean you get fast responses. May want to check your DNS server's
config. I don't know if other DNS software comes nicely preconfigured
like that, but it should, since nobody ever assigns localhost to be
anything else (imagine the confusion THAT would cause - even if you
set it to something relatively innocuous like 127.0.0.2).

Chris Angelico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top