Feasibility of serving IFSC data over dns
Before I begin, you have to watch the talk by Kailash Nadh where he explains DNS and dns.toys
Note: I might sound like I understand all of this, but I don’t. The below therefore might not be completely correct.
Why IFSC Over DNS
We were looking for a solution to verify bank details being entered on our offline first app. Any offline only solution means keeping an extract of the data on the phone and this could become difficult to maintain or keep up to date.
The next best approach was to think of a super low bandwidth solution that could work well even in the worst of signal conditions. With context from dns.toys, Via DNS seemed to be one solution. No overhead from ordinary api calls, faster response time and possibly smaller overall response.
I suggested this on the repo and Thanks to Gopu for implementing this over dns.toys!
You can compare the Razorpay api and dns methods using the below
Via DNS
dig +short YESB0DNB002.ifsc @dns.toys TXT
In the above, there is actually one dns lookup for dns.toys and then another dns lookup using the aname for the domain. By replacing it with the aname IP directly, I think its even faster.
Via API
curl https://ifsc.razorpay.com/YESB0DNB002
Note: There are quite a few services or methods to verify IFSC and bank details but the most comprehensive & free service I could find belongs to Razorpay