Add persistence layer
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12.4k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
Dealing with a server restart isn't a big deal for simple deployments of Toxiproxy with a couple proxies and toxics. However, as the environment grows to dozens of proxies things become problematic as a restart will take down every API until they are all setup again. The /populate endpoint takes care of a lot of this since it can be called when starting, but someone needs to maintain that JSON array.
I would like to propose a persistence layer that will save all proxies and toxics and populate them on application start to eliminate all manual work of maintaining the JSON. My thoughts on implementation would be to have an interface and create an implementation for MySQL where others could follow with additional implementations as required. The selection of the implementation would be done on application start and could have a predefined schema for RDBMS implementations.
What are your thoughts on this project? Are you all interested or have any special requirements?
I am willing to be the author for this issue.
Edit: clarity
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the /populate endpoint and the application-startup flow described in the issue. Define the persistence interface and MySQL implementation around saving proxies and toxics, with implementation selection at startup. Done means saved proxies and toxics are restored automatically after a server restart without maintaining a JSON array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100