Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
avatar image
REFINITIV
Question by ron.bove.1 · Feb 28, 2017 at 02:10 PM · elektronrefinitiv-realtimeelektron-sdktreprfasslsfc

​How do TREP API's behave when the DNS Server returns a list of IP Addresses?

How do TREP API's behave when the DNS Server returns a list of IP Addresses in response to a DNS lookup? Does it treat the list as a "Server List" or does it just take the first IP Address in the list.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by ron.bove.1 · Mar 01, 2017 at 10:25 AM

So even though the DNS server is returning multiple IP Addresses, only the first IP Address is used. I assume this means that those IP addresses are NOT treated as a server list.

Thanks for all your replies.

Comment
brian.sandri

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
brian.sandri · Mar 29, 2017 at 10:18 AM 0
Share

Yes - this is correct. The API only uses the first address returned by DNS.

avatar image
REFINITIV
Answer by umer.nalla · Mar 01, 2017 at 09:00 AM

Hi @ron.bove.1

Reading between the lines, I am guessing that what you meant to ask is 'How do the TREP APIs handle a list of servers in the 'serverList' parameter?

If this is your question, then:

RFA (Java, C++ and .NET) has a parameter 'serverSelectionOrder' which If set to True, servers in the serverList are chosen randomly instead of from left-to-right. This also affects the serverList of any Warm Standby Lists used by the connection.

If/when a connection to the selected server fails, RFA will try and failover to another server in serverList.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Jonathan Haruni - Refinitiv ♦♦ · Mar 01, 2017 at 04:18 PM 0
Share

The question (we had a conversation about this) comes from a client using round-robin DNS for failover and load balancing of ADS clients. [ Don't judge, just answer ] If a server hostname lookup returns a list of IPs from a round-robin DNS entry for a single (or only) server name in the serverList parameter, will RFA

  • expand those IPs into a new longer serverList
  • pick one, use it once, and do the name to address mapping again upon disconnect
  • pick one IP and use it forever
  • none of the above ?

What about EMA?

avatar image
REFINITIV
Answer by Jirapongse · Mar 01, 2017 at 10:15 PM

After resolving name, the list of IP addresses are kept in the DNS cache on the local machine. You can use ipconfig /displaydns on Windows to display the DNS cache. Then, it will use the information in the cache for the subsequent name resolving. TREP APIs use the first returned entry for the connection which is the first entry in the cache.

   trep.rdc.reuters.com
   ----------------------------------------
   Record Name . . . . . : trep.rdc.reuters.com
   Record Type . . . . . : 1
   Time To Live  . . . . : 3571
   Data Length . . . . . : 4
   Section . . . . . . . : Answer
   A (Host) Record . . . : 192.168.27.41

   Record Name . . . . . : trep.rdc.reuters.com
   Record Type . . . . . : 1
   Time To Live  . . . . : 3571
   Data Length . . . . . : 4
   Section . . . . . . . : Answer
   A (Host) Record . . . : 192.168.27.11

For example, with the above cache, TREP APIs will use 192.168.27.41 for the connection and re-connection for trep.rdc.reuters.com.

However, if I flush the cache (ipconfig /flushdns), the first entry in the cache can be changed in round robin after the next name resolving.

    trep.rdc.reuters.com
    ----------------------------------------
    Record Name . . . . . : trep.rdc.reuters.com
    Record Type . . . . . : 1
    Time To Live  . . . . : 3598
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 192.168.27.11

    Record Name . . . . . : trep.rdc.reuters.com
    Record Type . . . . . : 1
    Time To Live  . . . . : 3598
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 192.168.27.41

After flushing, the first entry in the DNS cache has been changed to 192.168.27.11. TREP APIs will use 192.168.27.11 for the connection for trep.rdc.reuters.com.

Therefore, if you disable the DNS cache (net stop dnscache), the first resolved entry can be changed in round robin so TREP APIs can use different IPs for the subsequent connections.

Comment
zoya faberov

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Nipat Kunvutipongsak · Mar 01, 2017 at 11:13 PM

In my opinion, a serverList parameter and DNS are used in the different context/level.

Any values defined in serverList, are processed when TREP's APIs read configuration settings at the beginning when you start the application. This is the scope that the application can handle.

After that, when TREP's APIs make a connection, this take is handled by lower levels which should be standard libraries, a runtime itself (e.g. Java Runtime; JRE), and OS by receiving a hostname from the higher level (i.e. the application and TREP's APIs).

Therefore, I don't think that any return values from DNS lookup will be seen by TREP's APIs level.

Comment
umer.nalla

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by brian.sandri · Mar 02, 2017 at 10:13 AM

All of the APIs (RFA, EMA, ETA/UPA) across languages will use the hostname lookup call that is appropriate for language and platform (getAddrInfo, gethostbyname, etc).There is nothing fancy going on – it will essentially connect to whatever address the name provided by the user is resolved to.If the DNS server is changing that address behind the scenes, it may result in subsequent reconnection attempts to the same hostname going to different underlying IP address as the API requeries the host to connect to upon reconnection (if DNS cache flushes, etc).

ServerList/ChannelSet parameters allow users to provide a list of hostnames that the API will iterate through upon connection loss. As it iterates the server list, it will use the underlying system calls to resolve the IP for the host in the list it will try next. Each host in the list will essentially behave as described in the first paragraph.

Comment
Jirapongse

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Olivier DAVANT ♦♦ · Mar 29, 2017 at 07:07 AM 0
Share

Hi @brian.sandri,

Hostname lookup calls (getAddrInfo, gethostbyname, etc) may return a list of IP addresses for a single name to resolve. What Ron wanted to know is if our APIs use these multiples IPs or only the first one. In his answer below Ron is assuming that only the first IP is used. This is also what I understand from your answer, even if you do not say it explicitly. If this assumption is correct, could you please confirm it by commenting Ron’s answer below? We will then tag it as the Best Answer in order to guide other community members who have a similar question.

avatar image
REFINITIV
Answer by ron.bove.1 · Mar 03, 2017 at 08:37 AM

Thanks again for all your replies,

In a related question, from testing there seems to be a subtle difference in the behavior between SSL and RSSL when it comes to recovery. It appears that with RSSL, if the connection to the first ADS disconnects, the application immediately switches to the second ADS in the Server List and so on. However, for SSL, it appears that the application will first attempt to reconnect to the ADS that it was disconnected from, before moving on to the next ADS in the Server List.

Normally this wouldn't make a difference, but by using DNS Load balancing it changes the behavior.

Is this expected behavior in RFA? Is this application dependent? Should we expect the same behavior in other API’s?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Jirapongse · Mar 22, 2017 at 03:22 AM

Yes, for SSL connection type, the application will first attempt to reconnect to the ADS that it was disconnected from, before moving on to the next ADS in the Server List. This is a connection recovery logic in SSL API.

However, RSSL API itself doesn't have the connection recovery logic so the behavior depends on the application or the API libraries which build on top of RSSL API.

For example, the ETA Reactor Value-Added library, RFA C++, and EMA C++ will reconnect to the next ADS in the connection list after disconnection.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
12 People are following this question.

Related Questions

How to implement RFA provider with hotstandby enabled ?

Proper behavior for an interactive provider upon loss of upstream communication

Stuck instruments when posting

Details for the FID "RECORDTYPE "RECORDTYPE" 259

Is there TREP ADS redirection mechanism based on service

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges