T
T
Timur Gromov2015-09-17 14:22:25
PHP
Timur Gromov, 2015-09-17 14:22:25

How to quickly find out the IP for many domains?

Greetings.
There is a task to get the current IP value from A-records for 200 thousand domains once a day.
Now this is done through a php script hanging on the crown, which checks in parts through the dns_get_record () function.
Average check time for one domain is 120 ms (freebsd 10).
But I think that this is not the fastest way.
What are some ideas?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
lega, 2015-09-18
@tmgrom

An example in python + gevent: www.gevent.org/intro.html#example
You can "throw up" 10k requests in parallel

R
Ruslan Fedoseev, 2015-09-17
@martin74ua

parallelize the check?

O
OnYourLips, 2015-09-17
@OnYourLips

Do it asynchronously or in multiple threads.

S
sivabur, 2015-09-20
@sivabur

Rewrite the check as a cgi script for php in c++ and parallelize both on one computer and on several. + if I'm not mistaken, there you can pull out the time after which the domain can change records; if it is more than a day, then there is no point in checking (I won’t say that for sure).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question