👩🚀 Improve Performance with Replcator 🤘
Improve Performance with Replcator
Ever wanted to improve the performance of your repl that more than one person uses, or quickly create a load balancer? Well, you're in luck. I recently created Replcator, a project that lets you load balance your repl in very few steps, while keeping development easy.
First, you'll need some repl to load balance. Any repl that displays a website is ideal.
- Fork the Replcator Repl and rename it.
- Get your
connect.sidcookie. If you're using Chrome, get this extension to easily view cookies. Do not share this cookie with anyone! People can use it to access your account.
- In the repl you forked, create a file called
- Set it's contents to
sid-herewith the value of your
connect.sidcookie. Don't worry, nobody will be able to see this.
- Go to the
config.jsfile and edit it with the correct information.
Here's the things in your
config.js that you should edit.
count: This is the number of repls that are going to be spawned and load balanced across. Due to annoying ratelimits, you should probably keep the max at 10 for now.
user: Your own username.
repl: The path to the repl you want to load balance. It should be in the format
@User/Repl-Name. Please replace all spaces with dashes.
I'll leave the rest out for now, but there should be comments with explanations next to them in the file.
All you have to do is click run, and lo and behold you should have a fully functional load balancer. If you get an error, please tell me in the comments, as Replcator is in beta and I'd love to improve it.
Here is an incomplete feature list of Replcator.
- Automatically duplicates and deploys your Repl, so you don't have to manually create and update a bunch of instances
- Scans all your instances periodically to look for errors, and automatically restarts if there is one
- Sets custom HTTP headers with extra info about the current Replcator instance
- Super simple and easy to use, can be set up in 5 minutes
I'd love to hear from you guys in the comments below!