Tips

Kong with docker

docker run --rm  --name kong-database \
                -p 5432:5432 \
                -e "POSTGRES_USER=kong" \
                -e "POSTGRES_DB=kong" \
                postgres:9.4
docker run --rm  --name kong \
              --link kong-database:kong-database \
              -e "DATABASE=postgres" \
              -p 8000:8000 \
              -p 8443:8443 \
              -p 8001:8001 \
              -p 7946:7946 \
              -p 7946:7946/udp \
              --security-opt seccomp:unconfined \
              mashape/kong
curl -i -X GET \
  --url http://localhost:8000/ \
  --header 'Host: mockbin.com'

curl -i -X POST \
  --url http://localhost:8001/apis/ \
  --data 'name=mockbin' \
  --data 'upstream_url=http://mockbin.com/' \
  --data 'request_host=mockbin.com'

curl -i -X POST \
  --url http://localhost:8001/apis/mockbin/plugins/ \
  --data 'name=key-auth'

curl -i -X POST \
  --url http://localhost:8001/consumers/ \
  --data "username=Jason"

curl -i -X POST \
  --url http://localhost:8001/consumers/Jason/key-auth/ \
  --data 'key=ENTER_KEY_HERE'

curl -i -X GET \
  --url http://localhost:8000 \
  --header "Host: mockbin.com" \
  --header "apikey: ENTER_KEY_HERE"

https://github.com/Mashape/kong/

Messaging

https://seroter.com/2016/05/16/modern-open-source-messaging-apache-kafka-rabbitmq-and-nats-in-action/

https://taskqueues.com/

  • Delayed tasks
  • schedule recurring tasks, like a crontab
  • schedule tasks to execute at a given time, or after a given delay
  • automatically retry tasks that fail
  • Result storage
  • Automatic retries