1 Answer
- Newest
- Most votes
- Most comments
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.
answered 5 years ago
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago