wrk -t4 -c400 -d10s http://127.0.0.1:1337/
Running 10s test @ http://127.0.0.1:1337/
4 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.02ms 6.94ms 82.86ms 85.27%
| object PrimaryFlow extends App { | |
| implicit val system = ActorSystem() | |
| implicit val materializer = ActorMaterializer() | |
| val sj = ScalaJack() | |
| val graph = FlowGraph.closed() { implicit builder: FlowGraph.Builder[Unit] => | |
| import FlowGraph.Implicits._ | |
| val in = Source(List.empty[String]) // hook this up to RabbitMQ | |
| val out = Sink.foreach( (mc:Command) => println("Command:" +mc) ) |
As per Nginx documentation, the key directives of proxy_http_version and proxy_set_header need to be set as per below:
upstream backend {
server 127.0.0.1:8080;
keepalive 8;
}| package akka.http.scaladsl | |
| import java.io.File | |
| import akka.http.scaladsl.unmarshalling.Unmarshal | |
| import akka.util.ByteString | |
| import scala.concurrent.duration._ | |
| import akka.actor.ActorSystem |
/var/lib/lxc/mycontainer/config$HOME/.local/share/lxc/mycontainer/configlxc.mount directive, that follows the format below. Substitute proper paths as necessary:
lxc.mount.entry = /path/to/folder/on/host /path/to/mount/point none bind 0 0| /* | |
| * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> | |
| */ | |
| import akka.actor.ActorSystem | |
| import akka.http.Http | |
| import akka.http.Http.IncomingConnection | |
| import akka.http.model.HttpEntity | |
| import akka.http.model.Multipart.FormData | |
| import akka.http.server.{ Directives, Route, RoutingSetup } |
| #!/usr/bin/bash | |
| # | |
| # Script should be run in GZ. | |
| # | |
| # example: | |
| # ./add-flow-to-vm.sh c480b89f-f8a1-41b1-abd0-45bac4685cb2 15M | |
| # | |
| # It will add TCP/UDP flows for this particular VM, and limits bandwidth to 15Mbps | |
| # |
| // Playbook - http://play.golang.org/p/3wFl4lacjX | |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/rand" | |
| "encoding/base64" |
| global | |
| maxconn 32768 | |
| quiet | |
| # Performance turning | |
| tune.maxaccept -1 | |
| stats socket /tmp/haproxy.sock mode 0666 level admin | |
| log 127.0.0.1 local0 notice | |
| log 127.0.0.1 local0 debug |
| package com.ilirium.client; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.PrintStream; | |
| import java.math.BigInteger; | |
| import java.security.InvalidKeyException; | |
| import java.security.KeyPair; |