# Plug POST performance

**URL:** <https://forum.elixirforum.com/t/plug-post-performance/473>\
**Category:** Questions\
**Tags:** performance\
**Created:** [April 30, 2016, 2:31pm UTC](https://forum.elixirforum.com/t/plug-post-performance/473 "2016-04-30T14:31:23Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![eldritchideen](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/e/58f4c7/32.png) [@eldritchideen](https://forum.elixirforum.com/u/eldritchideen)\
**Post date:** [May 2, 2016, 3:32am UTC](https://forum.elixirforum.com/t/plug-post-performance/473/15 "2016-05-02T03:32:12Z")

</div>

Interesting I have tried myself to benchmark a simple plug on my Macbook. The Plug code is listed below and started by

```elixir
{:ok, _} = Plug.Adapters.Cowboy.http SimplePlug, []

```

I get similar results to yourself I cannot get more than 26,000 Requests/sec. Tried setting +K true also.

```elixir
defmodule SimplePlug do
  import Plug.Conn

  def init(options) do
    options
  end

  def call(conn, _opts) do
    conn
    |> put_resp_content_type("text/plain")
    |> send_resp(200, "Hello")
  end
end

```

I tried a simple Java spark example.

```elixir
import static spark.Spark.*;

public class Main {
    public static void main(String[] args) {
        get("/", (req, res) -> "Hello");
    }
}

```

It gets about 35,000 Requests/sec. So it’s not that much ahead of Elixir.

Go out of the box, blows them all away…

```elixir
package main

import (
	"io"
	"net/http"
)

func handler(writer http.ResponseWriter, request *http.Request) {
	io.WriteString(writer, "Hello")
}

func main() {
	http.HandleFunc("/", handler)
	http.ListenAndServe(":8080", nil)
}

```

This gets about 51,000 Requests/sec

---

_[View the full topic](https://forum.elixirforum.com/t/plug-post-performance/473)._
