> For the complete documentation index, see [llms.txt](https://amartyushov.gitbook.io/tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amartyushov.gitbook.io/tech/app-aspects/software-architecture/app-dev-notes.md).

# App dev notes

| Load balancer                                                                                                                                                                                                                            | API gateway                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <ul><li><p>distributes incoming traffic across servers</p><ul><li>based on the load of the server</li><li>Algo: round robin: evenly</li><li>Algo: least connections: </li><li>Algo: IP hash: based on request origin</li></ul></li></ul> | <ul><li>Organiser that connects pieces of software.</li><li>Take client API request => forward to destination app.</li><li>Manage translations and protocols</li><li><p>can perform</p><ul><li>authentication</li><li>input validation</li><li>load balancing</li><li>service discovery/request dispatching</li><li>request transformation</li><li></li></ul></li></ul> |

## Monorepo or many repos

### Plus +

| Monorepo                                                                                                       | Many repos                                                                                                   |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| <ul><li>better dev and debug</li><li>easy sharing of common code</li><li>easy refactoring and review</li></ul> | <ul><li>clear ownership</li><li>smaller code base</li><li>narrow clones (code download/clone time)</li></ul> |

### Minus -

|                                                               | Many repos                                                                                                                                      |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| <ul><li>larger code base</li><li>greater clone time</li></ul> | <ul><li>difficult dev and debug</li><li>abstracts the knowledge of the platform</li><li>sharing of common code</li><li>how to deploy?</li></ul> |
