Let's say connection 1's speed is 1.5Mb/ps and its latency is 100ms,connection 2 is 1.5Mb/ps and latency is 200. what is the direct connection of latency to speed? if we download something using both connections ,speed is same and gaming (counter strike for example) is impossible with higer latency. but speed is not affected. WHY
thanks

Latency is the amount of time it physically takes your data to arrive at your destination - it's based mostly on distance, optimum routing and hardware that must be passed through. The speed is based off of your bandwidth - basically how much your ISP is lending you and can also be limited by hardware (slower NICs for example). Once you establish a connection, assuming there is low packet loss, the other end knows what it needs to send you and starts sending a stream of data. At this point the data is continous and latency only affects when it begins arriving, after that it is your bandwidth (download) and theirs (upload) that determines how fast you can accept it.

In a game you are constantly sending commands and receiving game states - and since these aren't predetermined latency comes into effect. The time between when you send the command and receive the game state is your latency. It doesn't matter how fast your internet is, if it takes a long time between when you send a command and the server receives it this will cause the frustrating lag that you are talking about. You might take 300ms to send a keystroke then receive the new gamestate, leaving you 300ms behind the actual game.

skatamatic is correct. Here is another way to think of it.

Latency is how fast it takes to load up a bus full of people.
Bandwidth is how many people fit into the bus.

Keep in mind that there is a window size in TCP/IP. A group of packets are sent, then waits for the other end to ACK those packets. While waiting for the ACK, the sender may be doing nothing for those 100-200ms.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.