application.conf 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # This is the main configuration file for the application.
  2. # ~~~~~
  3. # Secret key
  4. # ~~~~~
  5. # The secret key is used to secure cryptographics functions.
  6. play.http.secret.key = "RItx1I:80?W@]8GAtPDuF8Ydd3mXM85p/<7og]Q;uBOdijQAauRDgu73B6`wQP59"
  7. # The application languages
  8. # ~~~~~
  9. play.i18n.langs = [ "en" ]
  10. # Disable default filters
  11. play.filters.enabled = [ ]
  12. play.server.server-header = "Play2"
  13. play.server {
  14. netty {
  15. transport = "native"
  16. # Whether the Netty wire should be logged
  17. log.wire = false
  18. option {
  19. SO_BACKLOG = 8192
  20. SO_REUSEADDR = true
  21. "io.netty.channel.epoll.EpollChannelOption#SO_REUSEPORT" = true
  22. "io.netty.channel.epoll.EpollChannelOption#TCP_FASTOPEN" = 1
  23. child {
  24. SO_KEEPALIVE = true
  25. TCP_NODELAY = true
  26. SO_REUSEADDR = true
  27. # The default is 1 since Linux Kernel 3.13
  28. # You can check via "cat /proc/sys/net/ipv4/tcp_fastopen"
  29. # However 3 would be better, but we can't change it to that value because we don't have root permission when running the benchmarks
  30. "io.netty.channel.epoll.EpollChannelOption#TCP_FASTOPEN" = 1
  31. }
  32. }
  33. }
  34. }
  35. akka {
  36. actor {
  37. default-dispatcher {
  38. fork-join-executor {
  39. # one thread per core is enough
  40. # https://github.com/playframework/playframework/issues/7242#issuecomment-295215448
  41. parallelism-factor = 1.5
  42. # Information about the TechEmpower benchmark environment: https://www.techempower.com/benchmarks/#section=environment
  43. # The environment variable physical_cpu_count does NOT include the hyperthreaded cores!
  44. #parallelism-max = 14
  45. #parallelism-max = ${?thread_count}
  46. parallelism-max = 64
  47. task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
  48. }
  49. # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
  50. # Throughput defines the maximum number of messages to be
  51. # processed per actor before the thread jumps to the next actor.
  52. # Set to 1 for as fair as possible.
  53. throughput = 64
  54. }
  55. }
  56. }
  57. play.application.loader=AppLoader
  58. mongodb {
  59. servers = ["tfb-database:27017"]
  60. db = "hello_world"
  61. uri = "mongodb://tfb-database:27017/hello_world"
  62. }