Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I noticed that ******* quotes locked up shortly after the interest rate announcement yesterday while yours stayed stable." - Comment from Ron in Utah
"Thanks for following up with me. You guys do a great job in tech support." - Comment from Phelps
"I'm satisfied with IQFeed. It's the most reliable and fastest quote feed I have ever used. Although I'm a resident in China, it's still very fast!" - Comment from Xiaofei
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"I'm very glad I switched to IQFeed. It's working perfectly with no lag, even during fast market conditions." - Comment from Andy via Email
"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"Thank God for your Data Feed as the only Zippers I see are on my pants (LOL), and no more 200 pip spikes to mess up charts." - Comment from Spiro via Email
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Multiple sockets and history data look ups..
Author Topic: Multiple sockets and history data look ups.. (4 messages, Page 1 of 1)

jcrivello
-Interested User-
Posts: 12
Joined: Sep 7, 2011


Posted: Sep 26, 2011 04:50 PM          Msg. 1 of 4
I noticed that if I submit, say, five history data look up requests in rapid succession on the same socket, IQConnect will execute them one at a time in a serialized fashion. Even if I send all five requests together, IQConnect will not start processing all of them at the same time.

I can tell this because the responses come back like this: (Long Pause) Response 1 (Long Pause) Response 2 (Long Pause) Response 3 (Long Pause) Response 4 (Long Pause) Response 5, as opposed to: (Long Pause) Response 1 Response 2 Response 3 Response 4 Response 5, as you would expect if all the requests were submitted at approximately the same time.

But, I did notice that if I submit the five requests each on their own connection to the IQConnect history service, they will all complete at approximately the same time (indicating that they are submitted in parallel, as I hoped).

Given that IQFeed has been designed to handle multiple connections and application instances on a single machine in this way (ref: http://forums.dtn.com/index.cfm?page=topic&topicID=3156), I updated my application to use a number of sockets to submit history data requests, rather than just one.

This was working fine for a while this afternoon, until I started getting the following error:

'Could not connect to History socket.'

Am I exceeding some connection rate limit behind the scenes?

While I was debugging my application, I may have caused a lot of connections to be created and torn down (more than would be typical in normal use). This was happening because I would start 10-50 connections every time the application starts up, and while debugging I frequently need to restart the application.

I can work on implementing some local rate limiting to prevent tripping whatever the limit is, but I'm not sure where the "goal posts" are.

-Joe

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Sep 26, 2011 05:16 PM          Msg. 2 of 4
Joe, that error is returned anytime IQConnect cannot connect to the history servers. It is theoretically possible for you to hit a rate limit but it wouldn't be anything specifically in IQConnect or the servers. It would most likely be something within windows (IQConnect trying to allocate resources for a new socket connection to the servers and being unable to do so).

I would expect that about 10 simultaneous history requests is going to be the upper end of how many you can run at one time and still get increased performance. In general, you will probably either be hitting a bandwidth limit on your machine or a context switching limit on your machine that will degrade your performance beyond that point.

jcrivello
-Interested User-
Posts: 12
Joined: Sep 7, 2011


Posted: Sep 27, 2011 02:10 PM          Msg. 3 of 4
So there are rate limits? Can you share what they are?

At the time, my machine was very lightly loaded and shouldn't have been receiving any out of resource errors. I actually also checked to see if there were an excessive number of sockets stuck open at the time (potentially causing a available port starvation problem), but didn't find anything out of the ordinary.

BTW -- I have tested up to 50 simultaneous history requests and found a nearly linear improvement in performance up to that level. I have not tested more sockets, so I am not sure how far that can be taken. However, at that level, CPU, memory and bandwidth utilization on my machine was low.

I should note that I was making relatively small historical data requests (<100 data points), which could be a factor.

-Joe

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Sep 27, 2011 03:21 PM          Msg. 4 of 4
Joe, there are no limits built into the code of the feed or the servers currently. We do have plans to implement some reasonable limits in the future but those are only in planning stages at the present time.

Any limits I was referring to in the previous post would have been limits in the windows operating system and/or your operating environment (bandwidth/network equipment/etc).
 

 

Time: Tue May 7, 2024 4:56 PM CFBB v1.2.0 14 ms.
© AderSoftware 2002-2003