chrisruffalo / gudgeon

A DNS proxy with blocklists and user/machine groups
MIT License
11 stars 4 forks source link

Question - events #4

Open vardius opened 4 years ago

vardius commented 4 years ago

Hi Chris,

I tried to find an email to contact you directly but I couldn't find any info on your profile therefore I am asking here.

I've noticed you have been using one of my packages and then decided to move on from it.

https://github.com/chrisruffalo/gudgeon/commit/c8e6c9c6b7862995bd383909b4685406dd220f2b#diff-16908b0605f2645dfcb4c3a8d248cef3

Could I know reasons behind it ? Any feedback related to my message-bus would be very much helpful in improving it. I don't get many users, so I would like you to devote some time and tell me as much as possible.

also anything that comes to your mind.

Thanks in advance!

chrisruffalo commented 4 years ago

Hi!

I was using your library, which I didn't have any problems with, but I went through a period where Gudgeon was leaking memory all over the place. During that time I tried to remove every third-party dependency. I ended up with a very simple events design. It only dispatches one event at a time.

You need to understand that if Gudgeon ever sends more than like... one or two messages a second it probably mean something has gone awry. We have no use for speed (at this time).

So, no, it was nothing to do with your library at all but instead more of a paranoia on my part as I learn how to keep Golang memory consumption under control. (Reducing allocations and GC pressure.)

Thank you for getting back to me though!

vardius commented 4 years ago

Did you manage to identify memory leak ?

chrisruffalo commented 4 years ago

I'm not entirely sure. I was able to constrain it a lot more and in fact, over the last 50 days or so my home instance has served 4.6 million DNS requests and only inflated from about 25MB of ram to 35MB. In previous versions it would grow that much over a day or two.

I've not completely solved the issues but I can say that the situation is a lot more tenable.