This content was presented at a sig-testing meeting on 8/25/2020, available as a video here
package main | |
import ( | |
"bytes" | |
"flag" | |
"golang.org/x/net/websocket" | |
"io" | |
"k8s.io/client-go/1.4/rest" | |
"k8s.io/client-go/1.4/tools/clientcmd" | |
"log" |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"time" | |
"github.com/valyala/fasthttp" | |
) |
I hereby claim:
- I am exu on github.
- I am ex00 (https://keybase.io/ex00) on keybase.
- I have a public key ASA64vm8QItIOkLbBvBbpHqRQpNnxmEISrW2qI2QVFw2EQo
To claim this, I am signing this object:
I hereby claim:
- I am exu on github.
- I am ex00 (https://keybase.io/ex00) on keybase.
- I have a public key ASDPy0ZW9L2wtGYzcic-fjJZNr0sXSLKeaiu5mXV8tlhsgo
To claim this, I am signing this object:
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
// v2 of the great example of SSE in go by @ismasan. | |
// includes fixes: | |
// * infinite loop ending in panic | |
// * closing a client twice | |
// * potentially blocked listen() from closing a connection during multiplex step. | |
package main | |
import ( | |
"fmt" | |
"log" |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
import java.util.Arrays; | |
import org.springframework.boot.web.client.RestTemplateBuilder; | |
import org.springframework.cloud.client.loadbalancer.LoadBalanced; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.hateoas.MediaTypes; | |
import org.springframework.hateoas.hal.Jackson2HalModule; | |
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | |
import org.springframework.web.client.RestTemplate; |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.