2

I have a go program which takes requests processes them within 100ms and sends a response. I am using digitalocean Load Balancer and i noticed 'Average Request Duration' is pretty high around 33Kms.Below is the graph

https://i.stack.imgur.com/Uj9bN.png

Here is the code i am using...

count :="one"
n := func(ctx *fasthttp.RequestCtx) {    
switch count {
 case "one":
  handle(ctx)     //...dosomething for 100 ms function   
 default:
  ctx.Error("not found", fasthttp.StatusNotFound)
 }
}
fasthttp.ListenAndServe(":8082", n)

What am i doing wrong and why isn't my program closing requests.

Roman Kiselenko
  • 43,210
  • 9
  • 91
  • 103
rithik r
  • 191
  • 1
  • 1
  • 5

0 Answers0