Git Product home page Git Product logo

ifconfig.io's Introduction

ifconfig.io

Build Status

Inspired by ifconfig.me, but designed for pure speed. A single server can do 18,000 requests per seconds while only consuming 50megs of ram.

Contents

Short Summary

I used the gin framework as it does several things to ensure that there are no memory allocations on each request, keeping the GC happy and preventing unnessary allocations.

Tested to handle 10,000 clients doing 90,000 requests persecond on modest hardware with an average response time of 42ms. Easily servicing over 5 million requests in a minute. (Updated June, 2022)

LoadTest

Deployment

You can use the source code directly to deploy your own server. You can also use Docker and Docker Compose.

Docker-Compose

Here is a sample docker-compose file:

version: "3.4"

services:
  ifconfig:
    image: georgyo/ifconfig.io
    ports:
      - 8080:8080

Some other compose files:

version: "3.4"

services:
  ifconfig:
    image: georgyo/ifconfig.io
    ports:
      - 8080:8080
    environment:
      HOSTNAME: "ifconfig.io"
version: "3.4"

services:
  ifconfig:
    image: georgyo/ifconfig.io
    ports:
      - 8080:8080
    env_file:
      - ./.env

ENVs

This project offers you some customizability over what you show to user and ect. Here is list of all possible environment variable that you can pass to your instance, with their default values.

HOSTNAME="ifconfig.io" # Text address shown to user at header
CMD_PROTOCOL="" # Request protocol for curl commands
HOST=""
PORT="8080"
PROXY_PROTOCOL_ADDR=""
FORWARD_IP_HEADER="CF-Connecting-IP" # Request header to get IP from
COUNTRY_CODE_HEADER="CF-IPCountry" # Request header to get country code from
TLS="0"
TLSPORT="8443"
TLSCERT="/opt/ifconfig/.cf/ifconfig.io.crt"
TLSKEY="/opt/ifconfig/.cf/ifconfig.io.key"

ifconfig.io's People

Contributors

georgyo avatar renovate[bot] avatar maltere avatar bagheriali2001 avatar george-makerbot avatar mkoryak avatar stephaniesunshine avatar dependabot[bot] avatar fileformat avatar kovmir avatar jesb1n avatar josephfrazier avatar lionelnicolas avatar magiccc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.