Giter VIP home page Giter VIP logo

api_server's Introduction

api_server

Local Development Environment for C# API server
This was my second attempt at using C# as part of an educational side project coming from a very Python centric development background.
Many thanks to https://github.com/MattWood21 for providing feedback and help when required!

Roadmap

For future updates on this side project please see https://github.com/kmoorfield/Obsidian_Notes

Disclaimer

Feel free for anyone to copy / use this in any way as part of educational learning only!

Getting Started

Run the code

You can start the application by cloning the repo and executing the rebuild_containers.sh script in Git Bash.

Web API

The web api Swagger examiner is available, when running, at http://localhost:5000/swagger/index.html

Load testing

Load testing via Locust is available, when running, at http://localhost:8089/

Locust Load Testing Configuration

Main and Worker Configuration

In this configuration the load testing code is in the locust folder.

There are two Dockerfile's in use:

  • Dockerfile_Main This Dockerfile builds an image to act as the main locust container that will be used to access the web app at http://localhost:8089 when running. It also coordinates the workers.
    The entrypoint by default runs with an UI however locust can be set to run automatically without an UI by adding the following commands onto the entrypoint ["--run-time", "5m", "--headless"].
    The output is then logged within the docker container logs instead of within the UI.
  • Dockerfile_Worker This Dockerfile builds an image to act as the worker. It is pointed to the main image via the argument --master-host, whose value must match the hostname in application_stack.yaml for the load_main container.

Scaling Workers

You can pick the number of workers by defining the "--scale load_worker=X" value in the rebuild_containers.sh and then re-executing the script again to relaunch the stack.

Test Definitions

The tests are defined in the locust/tests folder and its sub-folders.

api_server's People

Contributors

kmoorfield avatar mattwood21 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.