Speeding up I/O bound python program
Minor Python cleanup
First, a bunch of little stuff:
This -
(str(i).zfill(len(str(111))))

does not need outer parens. Also, why the acrobatics to get &quot;3&quot;? Just declare a MAX_DIGITS = 3.
This -
'.'.join( list( reversed( line.split('\t')[1].split('.') ) ) )

should not be creating an inner list. The output of reversed is iterable.
This -
if(len(buffer_array) == 1000):

does not need outer parens; you're not in (C/Java/etc).
This -
save_file.close()

needs to be deleted both places that it appears. There's an implicit close() from your use of a with.
This -
    except Exception as e:
        pass

is a bad idea. Log or output the exception.
87 deserves a named constant.
Broad performance
gethostbyname is probably slow (as indicated in the comments). Consider running a local caching DNS resolution service to eliminate the first network hop.