NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Connecting

Connecting Support for establishing connections to your broker or market data service provider.

Reply
 
Thread Tools Display Modes
Old 06-03-2009, 04:20 PM   #1
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default Dual WAN Routers

Will Ninja Trader be able to seamlessly reconnect using a Zen-Fire data feed, if I have a dual WAN router and the primary (eg. cable) goes down and the secondary (eg DSL) takes over? Taking into account that each connection, cable and DSL, have different IP addresses.

This seems like a slightly different scenario than having only one interent connection going down for 5 minutes and then coming back online. In this case, Ninja Trader will reconnect just fine. But the IP address is the same.
Big D is offline  
Reply With Quote
Old 06-03-2009, 04:26 PM   #2
NinjaTrader_Kyle
NinjaTrader Customer Service
 
NinjaTrader_Kyle's Avatar
 
Join Date: Dec 2008
Location: Denver, CO, USA
Posts: 7,324
Thanks: 146
Thanked 252 times in 248 posts
Default

Hi Big D,

Thank you for your post.

As best I can tell, this should work. However, I do not have the ability to test this scenario on my end.
NinjaTrader_Kyle is offline  
Reply With Quote
Old 06-03-2009, 04:40 PM   #3
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

Does anyone else out there know the answer to this? Ray? Dierk?

Has anyone tried a dual WAN router with Ninja?

Anyone know if having a different IP address is important or not from the broker's perspective? ie ZenFire.
Big D is offline  
Reply With Quote
Old 06-03-2009, 04:45 PM   #4
NinjaTrader_Kyle
NinjaTrader Customer Service
 
NinjaTrader_Kyle's Avatar
 
Join Date: Dec 2008
Location: Denver, CO, USA
Posts: 7,324
Thanks: 146
Thanked 252 times in 248 posts
Default

Hi Big D,

Thank you for your reply..

Not sure if the IP change would prevent you from reconnecting from the broker's side. You would need to check with your broker.
NinjaTrader_Kyle is offline  
Reply With Quote
Old 06-03-2009, 05:06 PM   #5
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

I found this post:

http://www.ninjatrader-support2.com/...ead.php?t=1098

It's been 2.5 years since this post. Surely, someone at Ninja can get a dual-WAN and test this.

Any users out there have any experience?
Big D is offline  
Reply With Quote
Old 06-03-2009, 06:17 PM   #6
tradenoob
Junior Member
 
Join Date: Apr 2009
Posts: 8
Thanks: 0
Thanked 0 times in 0 posts
Default

I'm wanting to do the same thing Big D. Infact I just logged on to post this question. I did not think of it being an issue by changing IP addresses, thank you from bringing that to my attention. I currently have a DSL modem and it does occasionally require a reboot, so I'm thinking about getting a cable modem regardless. I would still like the DSL as a secondary.

A down connection could cost you a ton of money.

I think I'll post this question to my broker. BTW I use Zen-Fire as well. I will let you know what I find.
tradenoob is offline  
Reply With Quote
Old 06-03-2009, 06:20 PM   #7
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

The issue has to do with a secure connection. A secure connection cannot handle a change in the IP address mid-connection. I assume ZenFire is a secure connection to the broker. It is possible, though not likely, that ZenFire can automatically deal with a different IP address. I have an outstanding question to Pat at Mirus/Dorman. Will let you know the answer when I get it.
Big D is offline  
Reply With Quote
Old 06-03-2009, 07:21 PM   #8
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
Default

I own a TP-Link dual WAN router.

What will happen is you will get disconnected and then it will automatically reconnect.

Ninja has no idea you have a dual WAN router. It just knows the connection dropped, it auto-retries to connect again since you didn't manually disconnect via File -> Disconnect, and it will succeed because your router will failover to the working port.

Mike
ctrlbrk is offline  
Reply With Quote
Old 06-03-2009, 07:23 PM   #9
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
Default

Basically what I am trying to say is Ninja doesn't care. I have Zen Fire (Amp), it doesn't care either about your IP address.

If you have a single-WAN router, pull the internet cable and ninja "works" after you plug the cable back in, the same thing will be true of a properly configured dual-WAN router.

Mike
ctrlbrk is offline  
Reply With Quote
Old 06-03-2009, 07:40 PM   #10
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

ctrlbrk:

I've followed your other posts and appreciate your expertise on computer matters. Because of you, I now have VMWare virtual computers and multiple instances of Ninja on the same computer.

What were to happen if the failover occured so fast that Ninja didn't have time to disconnect? Meaning one moment it was connected to the primary and the next second it was connected to the secondary (on the dual-Wan). Ninja wouldn't know that the internet was down. It may not know to disconnect and then reconnect. Is this scenario possible? Or if the connection changes from primary to secondary, it will lose the ZenFire connection, because the secure ZenFire connection will have been broken, and disconnect and reconnect automatically? I can see Ninja and a dual-WAN working correctly as long as Ninja tries the reconnect logic, but failing and getting stuck if it can't somehow sense that it has been disconnected.

On the TP-Link dual-WAN. Does that unit handle load-balancing and failover at the same time? How fast does it failover when you lose the primary?
Big D is offline  
Reply With Quote
Old 06-03-2009, 08:00 PM   #11
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
Default

Yes, the TP-Link does load balancing and failover at the same time.

With regards to WAN 1 dropping and WAN 2 resuming "too fast" in which Ninja did not know it dropped, that cannot happen, at least not with a low-end router like mine (TP-Link TLR480-T+).

It is not because it can't be fast enough, it is because the TCP connection _will_ be forced closed, at which point Ninja will attempt to open a new one.

The failover times and load balancing is all configurable. You can also do QoS and priority filtering. For instance, I force my web server to prioritize over WAN 1. I force torrent traffic to prioritize over WAN 2. I have reasons for this. All other traffic, I allow it to load balance based on which WAN port is fastest at that moment (how much load it is under).

It constantly recalibrates. You can also have it actively perform a task to verify a WAN port is really alive. (ie, your Comcast cable-modem may still show a "link" to the WAN router, but your packets are being dropped on their network and not getting beyond your local hub ---- it can detect that, and take that WAN port off-line).

Here are some screens of the interface. English is definitely not their first language, but a lot of trial and error will get you were you need to be. For $100 bucks you can't go wrong, especially if you are a geek like me.

http://i41.tinypic.com/25aky1u.png

http://i42.tinypic.com/x6em9c.png

http://i43.tinypic.com/69jg2f.png

http://i40.tinypic.com/f03xht.png

BTW, thanks for the kind words

Mike
ctrlbrk is offline  
Reply With Quote
Old 06-03-2009, 08:03 PM   #12
ctrlbrk
Senior Member
 
Join Date: Oct 2008
Location: Dallas, TX
Posts: 682
Thanks: 0
Thanked 2 times in 2 posts
Default

Also should point out, that download a file from FTP will not load balance across two WAN ports. What you do is use something like DownThemAll, or open multiple FTP sessions (using this as an example) and TCP connection 1 will go over WAN 1 (or whatever is fastest), then TCP connection 2 will go over WAN 2 (or whatever is fastest).

So don't think a single TCP connection will load balance across both ports. Instead, it will take one TCP connection at a time and load balance them.

Mike
ctrlbrk is offline  
Reply With Quote
Old 06-03-2009, 09:11 PM   #13
zoltran
Senior Member
 
Join Date: Nov 2005
Location: , Ontario, Canada
Posts: 400
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by Big D View Post
ctrlbrk:

What were to happen if the failover occured so fast that Ninja didn't have time to disconnect? Meaning one moment it was connected to the primary and the next second it was connected to the secondary (on the dual-Wan). Ninja wouldn't know that the internet was down. It may not know to disconnect and then reconnect. ....
Big D..
I've been a network engineer for many years in another life, so allow me to try and answer.

A TCP session requires the IP addresses to be the same.
The connection will fail and be 'torn down' at the TCP level if your IP address changes. This is beyond Ninja or Zen .. it's basic TCP/IP.

So in your quick flip scenario .. your existing connection will eventually timeout when the 'flip' happens, and Ninja would/should be notified of this by Windows.
When it restarts it's connection to Zen, it will be a brand new session..

How quickly the reconnect happens depends on a lot of things like the router, the TCP code in windows and at the broker servers .. etc.

Having said this.. there are commercial grade devices that can present a common single IP address when using two or more ISP's. But they aimed at enterprise or SMB IT departments, and have a price tag in the 1000's to match.
zoltran is offline  
Reply With Quote
Old 06-04-2009, 09:30 AM   #14
Big D
Member
 
Join Date: Jan 2007
Location: , ,
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for all the great answers. The Ninja community can now have confidence in using Ninja Trader with dual-Wan routers.
Big D is offline  
Reply With Quote
Old 06-04-2009, 11:41 AM   #15
mrpowerballad
Member
 
Join Date: Mar 2008
Posts: 87
Thanks: 3
Thanked 4 times in 4 posts
Default

Quote:
Originally Posted by Big D View Post
Thanks for all the great answers. The Ninja community can now have confidence in using Ninja Trader with dual-Wan routers.
I appreciate the input from the network experts in this thread, but has anyone here actually experienced an event where your dual-wan router failed over during a live trade, and then had that trade finish executing as expected without any problems (e.g. not having to resubmit stop and profit targets)? I'm especially interested about OCO orders, since they seem more vulnerable to disruption. Thnx.
mrpowerballad is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dual timeframes starrynight Automated Trading 5 12-15-2008 05:18 AM
Dual Core? shortstop Miscellaneous Support 1 11-21-2007 12:42 PM
NT with a dual wan router? dandxg Connecting 4 10-18-2006 09:49 AM
Dual Connectivity through IB API whitmark Connecting 18 07-21-2006 05:56 PM
Dual Simm accounts Doc Miscellaneous Support 3 05-29-2006 07:59 AM


All times are GMT -6. The time now is 01:22 AM.