Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

.net - Possible to compress SQL Server network traffic?

I have a .NET client that needs to connect to a remote SQL Server over the WAN, is it possible to compress SQL traffic between the client and the server?

I am using .NET 3.5 and SQL Server 2005 and greater.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looking at the connectionstrings.com here for SQL Server 2008, the database providers do not have some kind of compression scheme...You may need to write a wrapper on a different port, that compresses the data, by using the front end, send the data across that port, from there, compress it, send it across to the remote endpoint, decompress it, and forward it on to the real tcp/ip port where the server is sitting on.

Usually SQL Server sits on port 1433...

Since a picture is worth a thousand words....

+--------+                                             +--------+
| CLIENT |                                             | SERVER |
+--------+                                             +--------+
  Port 1234                                          Port 1433 <+--+
     |                                                             |
     |                                                             |
     +={Module}=    <=>    TX/RX    <=>   ={Module}=  -+-----------+

The module will sit there on both ends compressing/decompressing...

To be quite honest, it sounds like there will be work involved as the Firewall's holes would have to be punctured to allow the compressed data in and out...throw in NAT/SNAT could make things complicated...

Have a look at this article that I wrote on Codeproject, that code acts as a traffic redirector and could easily be modified to use the compression/decompression scheme..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...