{"id":15017832,"url":"https://github.com/hmt/tinyscale","last_synced_at":"2025-04-12T13:03:36.581Z","repository":{"id":57675479,"uuid":"339191026","full_name":"hmt/tinyscale","owner":"hmt","description":"A tiny BigBlueButton load balancer","archived":false,"fork":false,"pushed_at":"2024-07-24T10:22:38.000Z","size":33,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T07:42:40.663Z","etag":null,"topics":["bigbluebutton","bigbluebutton-api","greenlight","load-balancer","moodle","nextcloud","scalelite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-15T19:56:35.000Z","updated_at":"2024-12-15T12:58:15.000Z","dependencies_parsed_at":"2025-04-12T13:03:25.728Z","dependency_job_id":null,"html_url":"https://github.com/hmt/tinyscale","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmt%2Ftinyscale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmt%2Ftinyscale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmt%2Ftinyscale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmt%2Ftinyscale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmt","download_url":"https://codeload.github.com/hmt/tinyscale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571888,"owners_count":21126522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigbluebutton","bigbluebutton-api","greenlight","load-balancer","moodle","nextcloud","scalelite"],"created_at":"2024-09-24T19:51:02.895Z","updated_at":"2025-04-12T13:03:36.550Z","avatar_url":"https://github.com/hmt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tinyscale\n\nTLDR: tinyscale is a single file load balancing solution for BigBlueButton that\nruns on deno.\n\nDepending on your requirements for BigBlueButton and your server capabilities\nyou may need to host more than one instance of BigBlueButton to host meetings\nfor your users. But as soon as you run more than one server you either need to\nsplit up servers for different endpoints, let's say one BBB server for\nGreenlight and another one for moodle, or you install a load balancer that\ndecides for you where new meetings are set up and where users are routed to. If\nyou only use one endpoint for all your meetings you will have to use a load\nbalancer such as scalelite to run more than one BBB instance.\n\nWhile scalelite is a very good load balancer it also uses a lot of resources and\nis somewhat complicated to set up (ymmv). tinyscale aims to fill the niche for a\nlightweight load balancing option that uses very little resources and keeps\nthings as simple as possible.\n\n## So, how does it work?\n\ntinyscale offers a unified gateway to your set of BBB servers. Just like BBB you\nhave to give your endpoint your tinyscale address and a secret and on the server\nside you have to give tinyscale a JSON file with your servers in it. tinyscale\nthen checks to see if it can connect to your BBB servers and wait for incoming\ncalls from your endpoint(s).\n\nIf you send a request to tinyscale it checks basically for two things: is there\na BBB instance running that has the requested `meetingID` or `recordingID` and\nthen redirects your request to that instance. You will from then on communicate\ndirectly with that instance.\n\nIn case the request is a `create` call and the `meetingID` doesn't yet exist\ntinyscale will pick the next instance from the list of your BBB instances and\nwill create a new room on that instance. The response is then returned to your\nendpoint.\n\nApart from that all incoming requests are checked for a valid checksum according\nto BBB's own API. If an invalid checksum is found you will get an error\nresponse.\n\nThe load balancing feature is basically a cycle through the available servers\nwith every room creation request where no room could be found on any of the\navailable instances.\n\n## Getting started\n\nTo get this load balancer to work you need a server that runs Deno. In most\ncases you should be ok to just run the installer script:\nhttps://deno.land/manual/getting_started/installation\n\nThen create a `servers.json` file like this here:\n\n```json\n[\n  {\n    \"host\": \"http://bbb1.schule.de/bigbluebutton/api\",\n    \"secret\": \"secret_string\"\n  },\n  {\n    \"host\": \"http://bbb2.schule.de/bigbluebutton/api\",\n    \"secret\": \"secret_string\"\n  }\n]\n```\n\nNow you are ready to start the script. Make sure to have an environment variable\ncalled `TINYSCALE_SECRET`:\n\n    TINYSCALE_SECRET=some_secret_string deno run --allow-net --allow-env https://deno.land/x/tinyscale@v2.0.2/main.ts\n\ntinyscale will then run on port 8000 and you will have to set up your reverse\nproxy so that it can pick up requests. If you prefer a different port you can\nset one with another env var: `PORT 3005`\n\nWhen started, tinyscale will connect to each server and make a single call to\ncheck if your configuration is correct. If there is a problem tinyscale will\nabort. If your configuration works you can start using it in your environment by\nreplacing your existing BBB settings with the new tinyscale url in your\nendpoints. Make sure to also replace the BBB secrets with your new\n`TINYSCALE_SECRET`.\n\ntinyscale has been battle tested to work with NextCloud, Moodle and Mattermost.\n\n## Caveats\n\n- tinyscale does not combine requests like `getMeetings`. It will return the\n  list of meetings from the current server (i.e. the last one used for creating\n  a room).\n\nMIT Licensed\n\n---\n\n**This project uses BigBlueButton and is not endorsed or certified by\nBigBlueButton Inc. BigBlueButton and the BigBlueButton Logo are trademarks of\nBigBlueButton Inc.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmt%2Ftinyscale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmt%2Ftinyscale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmt%2Ftinyscale/lists"}