libevent icon indicating copy to clipboard operation
libevent copied to clipboard

evdns caching

Open ghazel opened this issue 8 years ago • 13 comments

Revived from https://github.com/nmathewson/Libevent/pull/42 with an option to disable as requested.

ghazel avatar Nov 07 '17 21:11 ghazel

Coverage Status

Coverage decreased (-80.6%) to 0.0% when pulling 4a24f5c18167b1732a609ed3ae6e922a9a7e2860 on ghazel:evdns_caching into b49c70cc2ed54f511e2b41f7ed61d357c88300be on libevent:master.

coveralls avatar Nov 08 '17 06:11 coveralls

Coverage Status

Coverage decreased (-80.6%) to 0.0% when pulling 4a24f5c18167b1732a609ed3ae6e922a9a7e2860 on ghazel:evdns_caching into b49c70cc2ed54f511e2b41f7ed61d357c88300be on libevent:master.

coveralls avatar Nov 08 '17 06:11 coveralls

Coverage Status

Coverage increased (+0.04%) to 80.608% when pulling 8269e621b9d1e673b3a72dd7f243c67df6990699 on ghazel:evdns_caching into b49c70cc2ed54f511e2b41f7ed61d357c88300be on libevent:master.

coveralls avatar Nov 08 '17 12:11 coveralls

Sounds cool, many kudos to you.

Not sure about turning the cache on by default (but I guess doesn't worries me a lot), did you do it in purpose? And could please add some tests for this new major functionality? In the meantime I need sometime to play with it.

azat avatar Nov 19 '17 22:11 azat

Also it will be great to add this cache into server too (but this can be done in a separate patch of course)

azat avatar Nov 19 '17 23:11 azat

And also was it intended that it works only via evutil_getaddrinfo_async_() or I missing something?

azat avatar Nov 19 '17 23:11 azat

Hi @ghazel , any progress?

azat avatar Jan 04 '18 16:01 azat

Rebased. Yes, I only applied caching to the async resolver implemented in libevent. The blocking OS resolver implementations often have caching of their own.

ghazel avatar Jan 05 '18 06:01 ghazel

And yes, on by default. It improves performance, and doesn't violate the TTL of the records.

ghazel avatar Jan 05 '18 06:01 ghazel

Coverage Status

Coverage decreased (-80.5%) to 0.0% when pulling b3e5f3f89e8dea771b6b4371fde73113ff4b2b77 on ghazel:evdns_caching into 416b48ba7a0b44407b7a053bd21830aa75d7162f on libevent:master.

coveralls avatar Jan 05 '18 09:01 coveralls

Coverage Status

Coverage increased (+0.08%) to 80.601% when pulling 7c93e9d7e598107048b19105695b76e734d7117f on ghazel:evdns_caching into 416b48ba7a0b44407b7a053bd21830aa75d7162f on libevent:master.

coveralls avatar Jan 05 '18 14:01 coveralls

Coverage Status

Coverage increased (+0.08%) to 80.601% when pulling 7c93e9d7e598107048b19105695b76e734d7117f on ghazel:evdns_caching into 416b48ba7a0b44407b7a053bd21830aa75d7162f on libevent:master.

coveralls avatar Jan 05 '18 14:01 coveralls

Rebased. Yes, I only applied caching to the async resolver implemented in libevent. The blocking OS resolver implementations often have caching of their own.

By "works only for evutil_getaddrinfo_async_()" I meant that it doesn't work for evdns_base_resolve_ipv4() (and others), or I missing something?

azat avatar Jan 06 '18 11:01 azat