I have about the same amount of data in a Postgres database as part of the TLS Observatory project [1]. observatory=> select count(distinct(sha256_fingerprint)) from certificates; count --------- 1239943 observatory=> select count(distinct(target)) from scans; count --------- 6483386 The scanner evaluates both certificate and ciphersuites and stores the results in DB, so we can run complex analysis [2,3]. There is al…
I have something similar, running on a Linux desktop, to analyze SSL certs. The front end is in Go, which picks certs of interest (I wanted all certs with more than one domain) and loads them into a MariaDB database. Here's the code.[1] It's amazing how much work you can do on a modern computer when you actually use it for computing. [1] https://github.com/John-Nagle/certscan
Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
51–56 of 56 posts
Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
#52Earlier quoted context omitted.
> I have about the same amount of data in a Postgres database ... I'm curious, how fast can one load data into Postgres? Is it possible to import data directly from CSV files?
> I'm curious, how fast can one load data into Postgres? Hard to answer considering the number of variables impacting. pg_bulkload[0] quotes 18MB/s for parallel loading on DBT-2 (221s to load 4GB), and 12MB/s for the built-in COPY (with post-indexing, that is first import all the data then enable and build the indexes) > Is it possible to import data directly from CSV files? Yes, the COPY command[1] can probably be c…
Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
#53Earlier quoted context omitted.
Perhaps something like a modified PostgREST could work? https://github.com/begriffs/postgrest
The problem isn't so much exposing the data as a rest api, as it is allowing for complex queries that may contain various table joins, subqueries or recursive conditions. I only skimmed through the documentation of postgrest, but it doesn't make mention of joining tables, which is a deal breaker for our use case.
- People request access and get an API key associated with a given load threshold, or don't use an API key and default to some low threshold
- Anything that SQL EXPLAIN says is over the threshold returns an error
- Successful requests' load costs and execution time (and possibly CPU, if that can be determined) count toward a usage rate limit
- An SQL parser implements the subset of SQL you deem safe and acceptable and forms a last-resort firewall
Obviously this is a complex solution; I'm curious what people's opinions are on whether this would overall be simpler or more difficult in the long run.
Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
#54Earlier quoted context omitted.
No, getting access will probably take a couple of days (or in case of viewdns, more than 100$) and thereby all the fun out of the project. If you know of any other way to get the list I'd be happy to hear it though!
http://meanpath.com/freedirectory.html Feel free to grab a copy of our domain list. The "All domains with NS records" is the one you want. Has 191 million in it.
Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
#55Sorry, but is this golang concurrent networking pattern correct: func main() { ch := make(chan string) for i := 0; i All goroutines receive on the same channel! Instead a new goroutine should be launched for each net conn. One should be able to spawn 1000s (or 1Ms) of conns and avoid ulimits using buffered chans, waitgroups, timeouts, or counters...
Inspired now to start a "go-saturate" library for measuring max net capacity...
Re: Parsing 10TB of Metadata, 26M Domain Names and 1.4M SSL Certs for $10 on AWS
#56Earlier quoted context omitted.
No, getting access will probably take a couple of days (or in case of viewdns, more than 100$) and thereby all the fun out of the project. If you know of any other way to get the list I'd be happy to hear it though!
http://meanpath.com/freedirectory.html Feel free to grab a copy of our domain list. The "All domains with NS records" is the one you want. Has 191 million in it.