Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I found this by pure accident and a little curious as to why is there 2 active connections, on 2 different ports present between my system and stackoverflow. I was doing something else with the network on my system, and when I used just netstat below is what I got.
I thought it must the number of open browser tabs or stackoverflow webpages that are open, but even when I close them and study after like 10 mins, these 2 still reflect. Even though they are in the TIME_WAIT which upon research I came to know, that my system has closed the connection and is waiting for remaining packets to flush out,but I still dont have a clue about these connections.
Any ideas?
Note the "state" on those connections; TIME_WAIT means that the connection is closed but that it hasn't aged out of the connection table yet. It's also not at all uncommon for those connections to stay ESTABLISHED, since browsers will generally use HTTP Keep-Alive to avoid having to open new connections for every page request.
StackOverflow isn't 'maintaining' anything more than your browser is. Those connections are fully closed. The port is in TIME_WAIT state, which only lasts a couple of minutes after the final close. However there can be idle connections in ESTABLISHED state due to HTTP keep-alive.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was trying to install Fiddler2 to capture some HTTPS traffic in order to troubleshoot a slow file upload speed issue between client(windows 7) to a web server(Windows 2008 R2).
One strange thing I have noticed was the file uploading process became super fast after I have fiddler up and running. Could it because the fiddler started acting as a proxy server and using port 8888?
Why is it when I start using Fiddler2 the upload process speeds up?
Is this a WebDav request? Or a file upload through a traditional HTML form?
For WebDAV:
Most likely, this is due to a bug in the Microsoft WebDAV implementation, whereby they waste a bunch of time trying to "Automatically Detect" your proxy server over and over again via WPAD. This can be very slow in an environment without such a proxy server.
Fiddler caches the result of a proxy detection once at startup and sets itself as the system proxy, which prevents the WebDAV stack from incorrectly rerunning the WPAD algorithm over and over.
For a HTML Form:
Typically, this would mean that the client's buffer sizes were poorly chosen (IE6 had this problem) and thus the client isn't making good use of the network. Fiddler uses better buffer sizes (32k or 64k, IIRC) and hence makes better use of the network, reducing transfer times. Most modern browsers use buffer sizes chosen to optimize performance.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
In a LAN network, my machine is connected to the LAN server and my machine is connected to internet through LAN server. So, can I consider the LAN server as forward proxy?
Not typically.
If all traffic passes through the 'LAN server', you can consider the LAN server a gateway and a NAT-router.
If only HTTP/HTTPS/FTP traffic passes through the LAN server you might indeed be using an application proxy
If you have set up squid, for example, on your server and use it to get http content from the internet, then yes, the squid is a forwarding proxy service. If your server is running some DNS server to forward your queries to upstream DNS server (even such a small as dnsmasq), then yes, this DNS server is a forwarding proxy service.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have to develop a Java application that has to read some files on the network, edit them and put them back.
The problem is that I always did (over the network) file operations through the FTP protocol. But, I recently heard about Webdav which is HTTP based.
Did anyone notice a difference (in terms of speed) between them ? Which one is the best ? Why did they "invent" Webdav if the FTP is good for that?
WebDAV has the following advantages over FTP:
By working via one TCP connection it's easier to configure it to bypass firewalls, NATs and proxies. In FTP the data channel can cause problems with proper NAT setup.
Again due to one TCP connection, which can be persistent, WebDAV would be a bit faster than FTP when transferring many small files - no need to make a data connection for each file.
GZIP compression is a standard for HTTP but not for FTP (yes, MODE Z is offered in FTP, but it's not defined in any standard).
HTTP has wide choice of authentication methods which are not defined in FTP. Eg. NTLM and Kerberos authentication is common in HTTP and in FTP it's hard to get proper support for them unless you write both client and server sides of FTP.
WebDAV supports partial transfers and in FTP partial uploads are not possible (ie. you can't overwrite a block in the middle of the file).
There's one more thing to consider (depending on whether you control the server) - SFTP (SSH File Transfer Protocol, not related to FTP in any way). SFTP is more feature-rich than WebDAV and SFTP is a protocol to access remote file systems, while WebDAV was designed with abstraction in mind (WebDAV was for "documents", while SFTP is for files and directories). SFTP has all benefits mentioned above for WebDAV and is more popular among both admins and developers.
Answer for question - Why did they "invent" Webdav
WebDAV stands for Web Distributed Authoring and Versioning.
Internet was just not meant for consumption of resources through urls (Uniform resource locator)
But that is what it became.
Because HTTP had strong semantics for fetching resources (GET) and (HEAD). (POST) provided coverage for number of semantic operations while (DELETE) was shrouded in distrust. HTTP lacked some other qualities like multi-resource operations.
In nutshell, it was read protocol and not write protocol.
You would go round about to make your resources (URLs) available for fetching by uploading it though FTP and many number of mechanisms.
WebDAV was supposed to provide the missing story of internet : Support for authoring resource through the same mechanism HTTP. It extended its semantics, introduced new HTTP VERBS.
It also introduced the mechanism to not only read, write, modify and delete a resource (uris) but also make inquires on the meta properties of the resource and modify it. It is not that you could not do it before but it was done through back door mechanism.
So you see, it brought some of the same mechanisms that you expect on file operations on desktop to internet resources.
Following are some of the analogies:
MKCOL ----- make collection ----- similar to make folder
PROPGET ---- get properties (meta?) --- same as get info or extended attributes on mac
PROPPATCH --- modify properties
COPY ---- cp
MOVE ---- mv
I hope , I have established some of the noble goals of WebDAV as extension to HTTP to support internet authoring. Not sure if we have achieved it though.
For your question
Your application is a client and will have to make do with what mechanism is available - FTP or WebDAV on the other side. If WebDAV is available great, you can use it. But It will take some time getting used to the semantics. FTP is has limited semantics and excels in simplicity. If you are already using it, don't change it.
Which is faster
That is akin to answering, which is faster HTTP or FTP?
On a sly note, if it was such an issue we wouldn't have been downloading / uploading files via HTTP ;)
Since DAV works over HTTP, you get all the benefits of HTTP that FTP cannot provide.
For example:
strong authentication, encryption, proxy support, and
caching.
It is true that you can get some of this through SSH, but the HTTP infrastructure is much more widely deployed than SSH. Further, SSH does not have the wide complement of tools, development libraries, and applications that HTTP does.
DAV transfers (well, HTTP transfers) are also more efficient than FTP.
You can pipeline multiple transfers through a single TCP connection,
whereas FTP requires a new connection for each file transferred (plus
the control connection).
Reference
Depends on what you want to do.
For example, the overhead on FTP for fetching a list of files is 7 bytes (LIST -a), while it's 370 bytes with Webdav (PROPFIND + 207 Multi Status).
For sending some file, the overhead is lower on FTP than on Webdav, and so on.
If you need to send/fetch a lot of small files, FTP will prove faster (using multiple connections for correct pipelining, and per-file TCP connection).
If you're sending/receiving big files, it's the same on both technology, the overhead will be negligible.
Please see:
http://www.philippheckel.com/files/syncany-heckel-thesis.pdf
Webdav has advantages over FTP regarding easy passing of firewalls (no separate control/data sockets). Speed should be roughly the same as both protocols transfer the file over a raw tcp socket.
file modification time:
there seems to be a difference how ftp and webdav deal with file modification time.
It seems there is a 'command' in ftp to preserve that time (several ftp clients and servers claim to do that), whereas webdav, if I remember correctly, can get the file modification date but can not set it on upload.
owncloud client and some propriatary webdav clients seem to have a workaround, but that works only in their software
depending on usage, that is a stong argument in favour of ftp. I don't want my files to have their modification date == upload date. After a later download, I would not be able to tell by date which version of the file I have.
I am doing some performance testing with a large number of threads. Each thread is sending HTTP requests to another IP. It looks like at some stages the connections are closed (because there are too many threads) and then of course have to be reopned.
I am looking to get some ball park figures for how long it takes windows to Open TCP connections.
Is there any way I can get this?
Thanks.
This is highly dependent on the endpoints you're trying to connect to, is it not?
As an extreme best case, you can test it yourself by targeting an IIS on localhost.
I wouldn't be surprised if routers and servers that you are connecting through may drop connections as a measure against what could be perceived as connection storms or even denial-of-service attacks.