开发者

Latency with HTTPS communication

I have a website that communicates frequently with the server (Frequency: every 3 seconds ~)

The application consists of many Silverlight compo开发者_开发问答nents that do communication with the WCF services on the server. The communication happens real-time.

I wanted to encrypt the data transaction, so was wondering if HTTPS would work for me in this case?

Is HTTPS advisable for real-time and frequent communications? Does it increase the latency?

Thanks.


SSL is more expensive then a regular http connection because it has to conduct a handshake using RSA algorithm to basically establish the encryption algorithm and key that is used in subsequent connection.

If you have to establish a handshake every 3 seconds, then this gets a lot more expensive than regular http calls. However, the client could send a keep-alive header to the server to reuse the existing SSL Socket and not open a new negotiation before x seconds of idle time. In this case, you minimize the amount of overhead associated with the initial handshake. Most modern browsers have implemented the keep-alive within certain timeout (see this Wikipedia entry).

Once the handshake is established, there is additional latency of encrypting and decrypting your packet. This latency is normally acceptable in most application, but in order to determine if this latency is acceptable for your application, you would need to profile your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜