Cassandra NOSQL + DNS Database (indexed database of all domains in the world)

I need to create an indexed database of entire domains in the world.

.

Example:

domain1.com ips: 1.1.1.1,2.2.2.2,3.3.3.3 

domain2.com ips: 1.1.1.1,4.4.4.4

Requirements:

  • quick insert

  • quickly "picks"

  • index on ip - you need to quickly "select" for all domains on IP: 1.1.1.1.

.

I built it in Berkley-DB and it seems perfect: (note the annotation "MANY_TO_MANY")

.

@Entity

public static class DomainInfo {

  @PrimaryKey

  String domain;



  @SecondaryKey(relate=MANY_TO_MANY) 

  Set<String> IP = new HashSet<String>();

}

.

Can I build something like this in Kassandra?

Thank you so much!

.

+3
source share
2 answers

, . , Cassandra. ""? , "".

ips. , . 0.7 relase ( rc, -.) .

+2

:

DomainLookup = { 
  'domain1.com' : {
    'ips' : '1.1.1.1,2.2.2.2,3.3.3.3'
  } 
  'domain2.com' : {
    'ips' : '1.1.1.1,4.4.4.4'
  }
}

ReverseLookup = {
  '1.1.1.1' : {
    'domains' : 'domain1.com,domain2.com
  }
  '2.2.2.2' : {
    'domains' : 'domain1.com'
  }
  '3.3.3.3' : {
    'domains' : 'domain1.com'
  }
  '4.4.4.4' : {
    'domains' : 'domain2.com'
  }
}

, , . , Cassandra . , , . , Cassandra Dynamo, . , Cassandra, . , , - " ".

+1
source

Source: https://habr.com/ru/post/1771274/


All Articles