3 ms·
Assuming mmap 100mb will happen only once in each web-server.
by ddorian43 9y ago
Assuming mmap 100mb will happen only once in each web-server.
- chatmasta 9y agoWhat exactly do you mean by web server? Generally you will have at least one server process wherever you do the maxmind lookup, which could be at the LB/proxy (Nginx) or app server (node, python, go, etc). Nowadays these services are often heavily decoupled and therefore built to be as lightweight as possible. Think about small single purpose containers. Adding 100mb of memory requirements per instance could be quite expensive, depending which existing process is calling maxmind.
- boundlessdreamz 9y agoare you passing the original ip addresses to all these containers? Why don't you just decode the ip to location at the edge of your network (typically load balancer) and add a header with location?
- chatmasta 9y agoThat’s the best way to do it of course. But then you’re adding 100mb to each instance in your load balancing layer.
- ddorian43 9y agoSay you have python/ruby/js processes. You usually build 1 box/container with multiple processes inside. If you have 100 services and you distribute 1 process of each in each box then THAT is your problem. "Nowadays" people are wrong.