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.
已回答 5 年前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 3 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前