Files
2022-03-23 05:49:39 +01:00

1.7 KiB

README

This repo is meant to be a drop-in replacement for the vendor-scheduler-service built in Ruby. It is part of the overall programmatic design for ONEX.

Dependencies

RabbitMQ is used as the message queue for communication from and to ONEX. For local development, you can use the Docker image by running this command:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.9-management

After running, that you can access the management interface at http://localhost:15672 using the user name and password of guest.

Benchmark process

NOTE: Make sure ulimit -n is set appropriately. For example, if you expect to have 1000 concurrent connections, it should be higher than that.

fake_server is a simple web server that returns a JSON response in a randomized time of 200 - 800 milliseconds. You can adjust that interval to experiment with different upstream API response times.

go run fake_server/fake_server.go

fill_queue will seed 15,000 simulated ONEX messages on the queue. You can adjust this number as needed ONEX_QUEUE_URL="amqp://guest:guest@localhost:5672/" go run fillqueue/main.go

main.go pulls messages off the queue and makes a call to the fake server for each one. You can tweak the number of queued messages and the maximum number of parallel HTTP connections. ONEX_QUEUE_URL="amqp://guest:guest@localhost:5672/" VISTAR_API_URL="http://localhost:8090" go run vendorscheduler/main.go

  • Database configuration
  • How to run tests
  • Load testing
  • Deployment instructions