Hey I've been using openssl as a secure communication method between a client and my server, I've been downloading updates to the client using encrypted ssl and the speed is insanely slow, the packed file is around 6~ mb and takes 2-3 minutes to download. is there anyway to speed up openssl without taking a massive security hit? thanks!
Related
My download speed from a specific AWS S3 server is extremely slow - but it only happens from my Desktop PC, connected through Ethernet.
If I use my mobile phone or any other device (connected through wifi), the download speed is perfectly fine.
Basically getting less than 300Kb/s instead of 10Mb/s+
Any ideas on this? It's really weird...I've tried using Cloudflare Warp and similar stuff, nothing worked.
Hi I'm trying to develop a LibTorrent client based on the example client provided by the LibTorrent library(client_test.cpp) but I'm getting the strange behavior of being capped at 1 MB/s download and upload speed between machines. I've tried using the example client and changing all the settings to max, I've also tried using the client_test in high performance mode but I still get the speed cap. I know it's not a network issue as transferring a file between these machines over the network through Windows gives an average of ~100 MB/s. Could there be a setting I've been missing that's capped by default at 1 MB/s?
"transferring a file between these machines over the network through Windows", that's not the same as using the torrent protocol that can be throttled by isp's.
To test simply try the same .torrent in utorrent on the same machine.
I am working in MS Sync Framework 2.1 .I have 15-16 table that i need to synchronized.
I am doing code(in win form C#) which is work fine.I created provisions for each of the tables.
My code work and sequentially sync up one by one tables.Application takes approximately 10 min for download 9500 records from remote database server .But its seemed too slow. How i can speed up downloading records ?.
Can i use thread to downloading records, so all threads work parallely and might be application time will be decreases for download.
Is it thread safe or is server might be crash if hit rate (requesting data by applications) is increase?
How i can increase application speed for downloading record in winform C#
enable Sync Framework Tracing and have a look at where its spending most of its time, then decide how to optimize that part.
So we have some server with some address port and ip. we are developing that server so we can implement on it what ever we need for help. What are standard/best practices for data transfer speed management between C++ windows client app and server (C++)?
My main point is in how to get how much data can be uploaded/downloaded from/to client via his low speed network to my relatively super fast server. (I need it for set up of his live stream Audio/Video bit rate)
My try on explaining number 3.
We do not care how fast is our server. It is always faster than needed. We care about client tyring to stream out to our server his media. he streams encoded (via ffmpeg) live video data to our server. But he has say ADSL with 500kb/s of outgoing traffic. Also he uses some ICQ or what so ever so he has less than 500 kb/s per second. And he wants to stream live video! So we need to set up our ffmpeg to encode video with respect to the bit rate user can provide. We develop server side and client side. We need a way of finding out how much user can upload per second currently (so value can change dynamically over time)
Check this CodeProject Article
it's dot-net but you can try figure out the technique from there.
I found what I wanted. "thrulay, network capacity tester" A C++ code library for Available bandwidth tracking in real time on clients. And there is "Spruce" and it is also oss. It is made using some of linux code but I use Boost library so it will be easy to rewrite.
Offtop: I want to report that there is some group of people on SO down voting on all questions on this topic - I do not know why they are so angry but they deffenetly exist.
I've got a short-lived client process that talks to a server over SSL. The process is invoked frequently and only runs for a short time (typically for less than 1 second). This process is intended to be used as part of a shell script used to perform larger tasks and may be invoked pretty frequently.
The SSL handshaking it performs each time it starts up is showing up as a significant performance bottleneck in my tests and I'd like to reduce this if possible.
One thing that comes to mind is taking the session id and storing it somewhere (kind of like a cookie), and then re-using this on the next invocation, however this is making me feel uneasy as I think there would be some security concerns around doing this.
So, I've got a couple of questions,
Is this a bad idea?
Is this even possible using OpenSSL?
Are there any better ways to speed up the SSL handshaking process?
After the handshake, you can get the SSL session information from your connection with SSL_get_session(). You can then use i2d_SSL_SESSION() to serialise it into a form that can be written to disk.
When you next want to connect to the same server, you can load the session information from disk, then unserialise it with d2i_SSL_SESSION() and use SSL_set_session() to set it (prior to SSL_connect()).
The on-disk SSL session should be readable only by the user that the tool runs as, and stale sessions should be overwritten and removed frequently.
You should be able to use a session cache securely (which OpenSSL supports), see the documentation on SSL_CTX_set_session_cache_mode, SSL_set_session and SSL_session_reused for more information on how this is achieved.
Could you perhaps use a persistent connection, so the setup is a one-time cost?
You could abstract away the connection logic so your client code still thinks its doing a connect/process/disconnect cycle.
Interestingly enough I encountered an issue with OpenSSL handshakes just today. The implementation of RAND_poll, on Windows, uses the Windows heap APIs as a source of random entropy.
Unfortunately, due to a "bug fix" in Windows 7 (and Server 2008) the heap enumeration APIs (which are debugging APIs afterall) now can take over a second per call once the heap is full of allocations. Which means that both SSL connects and accepts can take anywhere from 1 seconds to more than a few minutes.
The Ticket contains some good suggestions on how to patch openssl to achieve far FAR faster handshakes.