Live data from Hacker News

Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

blog.waleson.com

11–20 of 56 posts

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#11
post #7

The key to the low cost seems to be that he needed to process 10TB. You get 10TB "data in" free, per month. Had it been 10TB more, or if he needed to run more than once a month, or if he needed to get that 10TB back out, the bill is around $920. Edit: Inbound might be unlimited free. The calculator did show me an inbound total a few times, but I can't reproduce it now.

Pretty sure it's unlimited.

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#12
post #7

The key to the low cost seems to be that he needed to process 10TB. You get 10TB "data in" free, per month. Had it been 10TB more, or if he needed to run more than once a month, or if he needed to get that 10TB back out, the bill is around $920. Edit: Inbound might be unlimited free. The calculator did show me an inbound total a few times, but I can't reproduce it now.

Pretty sure it's unlimited.

Appears that way. Still $920 if you had wanted to extract the 10TB back out though.

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#13

On a side note, I recently discovered https://scans.io/ where you can find pretty much all of the data that I collected as well. Might be interesting.

Censys (https://www.censys.io/) is also from them and it's a search frontend for a quick lookup in their data. It can come in real handy.

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#14
How much did storing the data on S3 cost where you said, "However, the data is on S3" or was it there for such a transient time that it didn't cost much? Bandwidth costs in/out of S3 too?

Edit: Actually I read the S3 parts again, it sounds like the CommonCrawl project pays the S3 costs, I think, since it looks like you're using their domain data?

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#15

How much did storing the data on S3 cost where you said, "However, the data is on S3" or was it there for such a transient time that it didn't cost much? Bandwidth costs in/out of S3 too? Edit: Actually I read the S3 parts again, it sounds like the CommonCrawl project pays the S3 costs, I think, since it looks like you're using their domain data?

The results of the Common Crawl project are hosted on AWS Public Data Sets, so it's not in my account. https://aws.amazon.com/datasets/

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#16
post #7

The key to the low cost seems to be that he needed to process 10TB. You get 10TB "data in" free, per month. Had it been 10TB more, or if he needed to run more than once a month, or if he needed to get that 10TB back out, the bill is around $920. Edit: Inbound might be unlimited free. The calculator did show me an inbound total a few times, but I can't reproduce it now.

You may have used an out of date calculator or it's for specific cases. AWS inbound traffic has been free since 2011

https://aws.amazon.com/blogs/aws/aws-lowers-its-pricing-agai...

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#17
post #6

Sort uses only a fixed amount of memory, you can sort files larger than memory, but for such situations where you have only a few tens of millions of distinct values you can just use a python dictionary and it works even faster. While sort would shuffle data around a lot, the memory dictionary would just hold a key and a count as it gobbles the logs. It works because it is a special case of sorting where there are re…

'sort | uniq' is another special case of this, and it is much better to replace that with 'sort -u'

the 'sort' in 'sort | uniq' doesn't know you are going to be throwing away all the duplicate data.

If anyone is wondering, here is an implementation of the python approach i have lying around:

  #!/usr/bin/env python2
  import sys
  from collections import defaultdict
  
  c = defaultdict(int)
  
  for line in sys.stdin:
      c[line] += 1
  
  top = sorted(c.items(), key=lambda (k,v): v)
  for k, v in top:
      print v, k,

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#18
post #6

Sort uses only a fixed amount of memory, you can sort files larger than memory, but for such situations where you have only a few tens of millions of distinct values you can just use a python dictionary and it works even faster. While sort would shuffle data around a lot, the memory dictionary would just hold a key and a count as it gobbles the logs. It works because it is a special case of sorting where there are re…

Don't you mean a python set? But yes, for use cases containing many duplicates where the result easily fits in memory, that is probably the fastest.

Fun fact: they are nearly the same implementation. See: http://markmail.org/message/ktzomp4uwrmnzao6

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#19
post #6

Sort uses only a fixed amount of memory, you can sort files larger than memory, but for such situations where you have only a few tens of millions of distinct values you can just use a python dictionary and it works even faster. While sort would shuffle data around a lot, the memory dictionary would just hold a key and a count as it gobbles the logs. It works because it is a special case of sorting where there are re…

Don't you mean a python set? But yes, for use cases containing many duplicates where the result easily fits in memory, that is probably the fastest.

a set replaces 'sort -u' or 'sort | uniq'. A dictionary replaces 'sort | uniq -c'

Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS

#20

How much did storing the data on S3 cost where you said, "However, the data is on S3" or was it there for such a transient time that it didn't cost much? Bandwidth costs in/out of S3 too? Edit: Actually I read the S3 parts again, it sounds like the CommonCrawl project pays the S3 costs, I think, since it looks like you're using their domain data?

The results of the Common Crawl project are hosted on AWS Public Data Sets, so it's not in my account. https://aws.amazon.com/datasets/

I see, without CommonCrawl paying for S3 (or AWS maybe eats that cost to help the public); this would be an expensive project.
Post reply on HN