Git Product home page Git Product logo

Comments (7)

manjuraj avatar manjuraj commented on August 23, 2024

@litao941 is there a reson why "localhost:22222" will not work for you?

from twemproxy.

litao941 avatar litao941 commented on August 23, 2024

Hello Manju,

I have four IPs on my server, i just want the status port is only listens on 127.0.0.1:22222. i used the netstat command, and the below was the result(OS: CentOS 5.4):

  [root@virt]# netstat -tlnup |grep nut
  tcp   0      0     10.11.80.50:22121    0.0.0.0:*    LISTEN   2268/nutcracker     
  tcp   0      0      :::22222                  :::*            LISTEN   2268/nutcracker

so, the result was i can used any IP (also include localhost) on my server to telnet the port 22222. i have already got some information from your code file nc_stats.h and changed the row 52:

  #define STATS_ADDR      "localhost"      ------>   #define STATS_ADDR      "127.0.0.1"

i was also re-compiled and re-made the source code. but it seemed not work. the result as above :::22222 .
i have no firewall on my OS, and need disable it listen on my internet IP. so is there any parameter for that or can i change the code for myself ?

BTW

from twemproxy.

manjuraj avatar manjuraj commented on August 23, 2024

Ah! Looks like stats_listen wasn't using STATS_ADDR. I fixed this in this commit: fd32801

you can now use STATS_ADDR #defined to "127.0.0.1" for your instance to only listen on 127.0.0.1

let me know if this works for you?

from twemproxy.

litao941 avatar litao941 commented on August 23, 2024

Yea, i have made a test again. It works now. __ ^ _ ^__
But also recommend that you can add a parameter for that.
Thank your for your help.
Also appreciate your twemproxy. it's 40 times faster than use memcached direct and only just 2 times CPU(s) used.

from twemproxy.

manjuraj avatar manjuraj commented on August 23, 2024

great to hear that; I will add a command line param soon.

To reduce cpu load use (-m 512)

also, if your company is using twemproxy, let me know and I will add you to https://github.com/twitter/twemproxy#users

from twemproxy.

manjuraj avatar manjuraj commented on August 23, 2024

You can use the option --stats-addr to set the stats monitoring port

-a, --stats-addr=S     : set stats monitoring ip (default: 0.0.0.0)

from twemproxy.

litao941 avatar litao941 commented on August 23, 2024

company sit is: www.56.com

from twemproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.