bithyve / bitcointribe

Bitcoin Tribe. A simple bitcoin wallet made to be used with Friends and Family. Lightning. Gifts and more.
https://bitcointribe.app/
MIT License
124 stars 62 forks source link

Backend optimisation #4434

Open antuz123 opened 3 years ago

antuz123 commented 3 years ago

Look at all the backend services and optimise them

cakesoft-utkarsh commented 2 years ago

Updating our discussion

Organize: need to organize the backend properly. Do we need all the instances, do we need it in the way they are structured? Do we move all to AWS? Goal: here is to make it simpler to manage going forward

Optimize: All the instances may not be fully used or may not be in the right billing category etc. Need to think about each instance independently. Goal: Make it more efficient/ cheaper to run going forward

Access Control: Does everyone need access to the instances/ projects? Does everyone have the correct roles and rights? Need three levels of access. Team - Company and Root. The team is for all the work that needs to be done with approvals built-in. The company is for billing and approvals to live instances/ projects. Root level access for Hexa@bithyve.com which has the right to do access management for all members.

cakesoft-utkarsh commented 2 years ago
Optimize Some of the suggestions to reduce cost. Instance Current Type Current Cost Suggested Type New Cost Comment
stagingeks t3.medium $0.04180 t3a.small $0.01880 1. Changing the type from t3 to t3a reduces the cost.2. Additionally changing the type from medium to small further reduces cost
corenode r5.large $0.12600 t3a.small $0.01880 1. corenode has only some spikes in utilization which is supported by t3a series of instances.2. T3a.small should be enough for such type of load.
deveks t3a.medium $0.04180 t3a.small $0.01880 1. Changing the type from medium to small reduces cost
testnode r5a.large $0.11300 t3a.small $0.01880 1. testnode has only some spikes in utilization which is supported by t3a series of instances.2. T3a.small should be enough for such type of load.
wrapper-dev t2.medium $0.04640 t3a.small $0.01880 1. This is hardly being used, is this required? 2. We can surely downgrade to smaller instances.
Atlas M2 Instance Atlas M2Instance $0.00411     1. We can install Mongo db to same instance where the application is running. Need login to mongodb.com to verify and suggest.
HEXA-LIVE Atlas M20 Instance - AWS $0.07200    
Google App Engines         Google App Engines are fully managed and are on-demand, so we are charged only per usage.
cakesoft-utkarsh commented 2 years ago

Possible optimizations are done and updated my comment above.