{"action":"opened","issue":{"url":"https://api.github.com/repos/emileaben/ixp-country-jedi/issues/10","labels_url":"https://api.github.com/repos/emileaben/ixp-country-jedi/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/emileaben/ixp-country-jedi/issues/10/comments","events_url":"https://api.github.com/repos/emileaben/ixp-country-jedi/issues/10/events","html_url":"https://github.com/emileaben/ixp-country-jedi/issues/10","id":123379491,"number":10,"title":"[Enhancement] Caching IP information based on subnets","user":{"login":"racheesingh","id":676736,"avatar_url":"https://avatars.githubusercontent.com/u/676736?v=3","gravatar_id":"","url":"https://api.github.com/users/racheesingh","html_url":"https://github.com/racheesingh","followers_url":"https://api.github.com/users/racheesingh/followers","following_url":"https://api.github.com/users/racheesingh/following{/other_user}","gists_url":"https://api.github.com/users/racheesingh/gists{/gist_id}","starred_url":"https://api.github.com/users/racheesingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racheesingh/subscriptions","organizations_url":"https://api.github.com/users/racheesingh/orgs","repos_url":"https://api.github.com/users/racheesingh/repos","events_url":"https://api.github.com/users/racheesingh/events{/privacy}","received_events_url":"https://api.github.com/users/racheesingh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-21T23:15:30Z","updated_at":"2015-12-21T23:15:30Z","closed_at":null,"body":"As of now, IPInfoCache.py keeps track of ASN information per IP (self.ips['asn']). Due to this, when I use `MeasurementEnhance.py:aslinksplus` to get IP->ASN conversion for a large number of traceroutes, I see many requests going out to IPs within the same /24. Is is advisable to cache AS info for the subnets that get announced by them? For instance, querying stat.ripe.net for 49.255.240.218 fetches this response:\r\n\r\n```JSON\r\n{\r\n    \"status\": \"ok\", \r\n    \"server_id\": \"stat-app1\", \r\n    \"status_code\": 200, \r\n    \"version\": \"1.3\", \r\n    \"cached\": false, \r\n    \"see_also\": [], \r\n    \"time\": \"2015-12-21T22:46:08.559023\", \r\n    \"messages\": [\r\n        [\r\n            \"info\", \r\n            \"1 routes were filtered due to low visibility (min peers:3).\"\r\n        ], \r\n        [\r\n            \"warning\", \r\n            \"Given resource is not announced but result has been aligned to first-level less-specific (49.255.0.0/16).\"\r\n        ]\r\n    ], \r\n    \"data_call_status\": \"supported - connecting to ursa\", \r\n    \"process_time\": 10948, \r\n    \"query_id\": \"99c2afee-a834-11e5-9234-782bcb34677e\", \r\n    \"data\": {\r\n        \"query_time\": \"2015-12-21T16:00:00\", \r\n        \"is_less_specific\": true, \r\n        \"resource\": \"49.255.0.0/16\", \r\n        \"actual_num_related\": 0, \r\n        \"num_filtered_out\": 1, \r\n        \"asns\": [\r\n            {\r\n                \"holder\": \"VOCUS-BACKBONE-AS Vocus Connect International Backbone,AU\", \r\n                \"asn\": 4826\r\n            }\r\n        ], \r\n        \"block\": {\r\n            \"resource\": \"49.0.0.0/8\", \r\n            \"name\": \"IANA IPv4 Address Space Registry\", \r\n            \"desc\": \"APNIC (Status: ALLOCATED)\"\r\n        }, \r\n        \"related_prefixes\": [], \r\n        \"type\": \"prefix\", \r\n        \"announced\": true\r\n    }\r\n}\r\n```\r\nWe could cache { \"49.255.0.0/16\": 4826 } and it would take care of queries for many IPs in that subnet. Does this sound conceptually correct?"}}