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!

AWS
已提問 5 年前檢視次數 522 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南