<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
<?php | |
/** | |
* Generate an encryption key for CodeIgniter. | |
* http://codeigniter.com/user_guide/libraries/encryption.html | |
*/ | |
// http://www.itnewb.com/v/Generating-Session-IDs-and-Random-Passwords-with-PHP | |
function generate_token ($len = 32) | |
{ |
#! /bin/bash | |
wget --content-disposition ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz | |
tar -zxvf pcre-8.40.tar.gz | |
apt-get -y update | |
apt-get -y install git | |
apt-get -y install openssl libssl-dev | |
apt-get -y install build-essential autoconf automake libtool bison re2c |
# Start the old vagrant | |
$ vagrant init centos-7 | |
$ vagrant up | |
# You should see a message like: | |
# Installing Virtualbox Guest Additions 5.0.20 - guest version is unknown | |
$ vagrant ssh | |
vagrantup:~$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm | |
vagrantup:~$ sudo yum -y update |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
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.
#!/bin/bash | |
# Startup script for etcd | |
# | |
# chkconfig: 2345 20 80 | |
# description: Starts and stops etcd | |
. /etc/init.d/functions | |
prog="etcd" | |
ETCD_BIN=$(which etcd 2> /dev/null) |
There are two main modes to run the Let's Encrypt client (called Certbot
):
Webroot is better because it doesn't need to replace Nginx (to bind to port 80).
In the following, we're setting up mydomain.com
.
HTML is served from /var/www/mydomain
, and challenges are served from /var/www/letsencrypt
.
#!/bin/sh | |
# -*- coding: utf-8 -*- | |
IPTABLES=/sbin/iptables | |
SERVICE=/sbin/service | |
SSH_PORT=22 | |
$IPTABLES -F # すべてのチェインの内容を削除 | |
$IPTABLES -P INPUT ACCEPT # INPUTチェインのポリシーをACCEPTにする |