Skip to content

Instantly share code, notes, and snippets.

@mocyuto
Last active September 22, 2016 01:13
Show Gist options
  • Save mocyuto/9607b5fb395504f2597239161ebe21af to your computer and use it in GitHub Desktop.
Save mocyuto/9607b5fb395504f2597239161ebe21af to your computer and use it in GitHub Desktop.
akkaの設定をいじったもの
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
loglevel = DEBUG
logger-startup-timeout = 25s
actor.deployment {
# deployment id pattern - on the format: /parent/child etc.
/test {
# routing (load-balance) scheme to use
# - available: "from-code", "round-robin", "random", "smallest-mailbox",
# "scatter-gather", "broadcast"
# - or: Fully qualified class name of the router class.
# The class must extend akka.routing.CustomRouterConfig and
# have a constructor with com.typesafe.config.Config
# parameter.
# - default is "from-code";
# Whether or not an actor is transformed to a Router is decided in code
# only (Props.withRouter). The type of router can be overridden in the
# configuration; specifying "from-code" means that the values specified
# in the code shall be used.
# In case of routing, the actors to be routed to can be specified
# in several ways:
# - nr-of-instances: will create that many children
# - routees.paths: will look the paths up using actorFor and route to
# them, i.e. will not create children
# - resizer: dynamically resizable number of routees as specified in
# resizer below
router = "round-robin"
# number of children to create in case of a router;
# this setting is ignored if routees.paths is given
nr-of-instances = 40
}
}
default-dispatcher {
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 40
# The parallelism factor is used to determine thread pool size using the
# following formula: ceil(available processors * factor). Resulting size
# is then bounded by the parallelism-min and parallelism-max values.
parallelism-factor = 100.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 256
}
}
# Throughput defines the number of messages that are processed in a batch
# before the thread is returned to the pool. Set to 1 for as fair as possible.
throughput = 10
}
spray.routing {
verbose-error-messages = off
file-chunking-threshold-size = 128k
file-chunking-chunk-size = 128k
file-get-conditional = on
render-vanity-footer = yes
range-coalescing-threshold = 80
range-count-limit = 16
}
spray.can {
server {
# If a request hasn't been responded to after the time period set here
# a `spray.http.Timedout` message will be sent to the timeout handler.
# Set to `infinite` to completely disable request timeouts.
request-timeout = 30s
# Enables/disables support for statistics collection and querying.
# Even though stats keeping overhead is small,
# for maximum performance switch off when not needed.
stats-support = on
# Enables/disables the addition of a `Remote-Address` header
# holding the clients (remote) IP address.
remote-address-header = on
# The time period within which a connection handler must have been
# registered after the bind handler has received a `Connected` event.
# Set to `infinite` to disable.
registration-timeout = 20s
# The maximum number of requests that are accepted (and dispatched to
# the application) on one single connection before the first request
# has to be completed.
# Incoming requests that would cause the pipelining limit to be exceeded
# are not read from the connections socket so as to build up "back-pressure"
# to the client via TCP flow control.
# A setting of 1 disables HTTP pipelining, since only one request per
# connection can be "open" (i.e. being processed by the application) at any
# time. Set to higher values to enable HTTP pipelining.
# Set to 'disabled' for completely disabling pipelining limits
# (not recommended on public-facing servers due to risk of DoS attacks).
# This value must be > 0 and <= 128.
pipelining-limit = 128
}
client {
# The time after which an idle connection will be automatically closed.
# Set to `infinite` to completely disable idle timeouts.
idle-timeout = 60s
# The time period within which the TCP connecting process must be completed.
# Set to `infinite` to disable.
connecting-timeout = 10s
}
host-connector {
# The maximum number of parallel connections that an `HttpHostConnector`
# is allowed to establish to a host. Must be greater than zero.
max-connections = 10
# The maximum number of times an `HttpHostConnector` attempts to repeat
# failed requests (if the request can be safely retried) before
# giving up and returning an error.
max-retries = 5
# The time after which an idle `HttpHostConnector` (without open
# connections) will automatically terminate itself.
# Set to `infinite` to completely disable idle timeouts.
idle-timeout = 30 s
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment