smf icon indicating copy to clipboard operation
smf copied to clipboard

rpc_addr | http_addr c++

Open emaxerrno opened this issue 6 years ago • 6 comments

the rpc_server should have 2 seastar::ipv4_addr structs, one for http and one for rpc.

There should be no implicit addr 's in codebase. i.e.: :::0

emaxerrno avatar Apr 01 '19 16:04 emaxerrno

ugh. this would be a breaking change :'(

emaxerrno avatar Apr 01 '19 20:04 emaxerrno

replace http_port and rpc_port in server_args with ipv4_addrs?

dotnwat avatar Apr 17 '19 00:04 dotnwat

yeah something like this


namespace smf {
enum class rpc_server_bitflags : uint32_t { disable_http_server = 1 };

struct rpc_server_args {

  seastar::ipv4_addr http;
  seastar::ipv4_addr rpc;

  /// \brief see enum rpc_server_flags
  uint32_t bitflags = 0;

  /// \ brief The default timeout PER connection body. After we parse the
  /// header of the connection we need to make sure that we at some point
  /// receive some bytes or expire the connection.
  ///
  typename seastar::timer<>::duration recv_timeout = std::chrono::minutes(1);
  /// \brief 4GB usually. After this limit, each connection to this
  /// server-core will block until there are enough bytes free in memory to
  /// continue
  ///
  uint64_t memory_avail_per_core = uint64_t(1) << 31 /*2GB per core*/;

  // i.e.: /proc/sys/net/ipv4/tcp_keepalive_time
  int32_t keepalive_idle_secs = 5;
  // i.e: /proc/sys/net/ipv4/tcp_keepalive_intvl
  int32_t keepalive_interval_secs = 75;
  // i.e: /proc/sys/net/ipv4/tcp_keepalive_probes
  int32_t keepalive_prob_count = 9;
  bool nodelay = true;
  bool enable_keepalive = true;
};


emaxerrno avatar Apr 17 '19 00:04 emaxerrno

this will also solve the problem that @nacl was suggesting w/ idl secs & keep alive.

just about threading those through and through.

emaxerrno avatar Apr 17 '19 00:04 emaxerrno

#118 - i think was this.

emaxerrno avatar Apr 17 '19 00:04 emaxerrno

err this: https://github.com/smfrpc/smf/issues/335

emaxerrno avatar Apr 17 '19 00:04 emaxerrno