What is best database or search service to store and search for millions of ip addresses?

0

A customer has millions of potential IP addresses in IP ranges they set up. They are looking for ways to easily search to see if a certain range or specific IP address belongs to their strings. The way they do it now is they have a script they run and it takes a while to return the info.

They are looking for a way to easily search a specific IP address or range and see if it belongs to them. I am leaning along the lines of elastic search, DocumentDB or DynamoDB but am unsure which option would be best for them. If anyone has any insights, please advise. If anyone also has seen blog posts or sample databases for such a use case, please also share.

Much thanks!

1개 답변
0
수락된 답변

The answer depends on a number of factors, including whether you are using IPv4 or IPv6 addresses (or both), whether you are tracking individual addresses, subnets, or both, and whether you need to store additional attributes other than just the address range.

One approach for IPv4 lookup is to convert the ip address to an integer, store the integer in a DocumentDB document with associated metadata, and use simple $eq queries to match relevant documents. https://stackoverflow.com/questions/18281696/mongodb-network-subnet-lookup has an example of a similar approach.

AWS
Jeff_D
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠