=============================== Cost Estimation =============================== Introduction -------------- In order to bring evolution to our product, we must asses the actual costs of the current evolution of the product. This may be very relevant to the pricing policies that are available within. Since Ramses is very deprived of features, we'll use an example that has more pricing options available, such as ads, sponsorships & partnerships and user-subscriptions. When to scale? ---------------- Lets first consider the userbase an application must have where horizontal scalability can make an impact. And also the cost of making an *existing* application horizontally scalable. Scalability costs ------------------- This can be broken down into two categories, for the most case, **inhouse** & **outsourced** -- given that this application has/does CRUD, REST, and other methodologies described in this portfolio, the cost & time estimation: - 5 member SWE team, 1 additional manager + scrum master. - 6 weeks - 1000-1400 man hours If the technological debt isn't too high (ie no convoluted business logic) & the documentation is available, this can be done using a project team ranging from low to high skill. This of course hugely impacts the cost estimation that beyond this point these numbers are purely created by me. This team then would have to transform the old monolith into a new microservice/serverless architecture & configure cloud computing with this new platform. While also keeping in mind that stateful code can delay the project significantly depending on the technical debt. **Inhouse** Using the scalability costs from above, and assuming an expense of 50,- for every man hour the cost would be estimated to: 60.000,- **Outsourced** Using the scalability costs from above, and assuming an expense of 150,- to 200,- for every man hour the cost would be estimated to: 210.000,- And that is not considering that these projects have a tendency to fail. But assuming that those are the costs of being able to scale the application, at what point does the value return itself over **hosting-costs** because the value of evolution has more value than purely money. Such as better performance, less downtime & being infinitely able to scale. The downside of this monolith is that at one point, you will be using the biggest virtual machine that your cloud provider provides and your users from Australia will be connecting to a server in Amsterdam, instead of a server running in Australia running the same code. Hosting cost -------------- The interesting metrics in this are cost per user & profit per user. Let's take a look at hosting costs for a medium size platform, preferably running in a monolithic way. I am the co-founder of a social network called Nearby. We have 10 million users with 1 million monthly active users. Some of our users are VERY active. We allow our users to upload images and videos. We pay about $250 a month for our database servers. We pay about $150 for front end application servers. We pay about $200 for image and video retrieval front end servers. We pay about $500 for CDN/bandwith. We pay $400 for object storage. These are rough numbers as they fluctuate monthly, but should give a good approximation on costs. We are running a hybrid between the Microsoft Azure cloud and dedicated servers on OVH. -- 4yrs ago by Brian P. Hamachek https://www.quora.com/How-do-you-calculate-server-costs-per-user-for-a-social-networking-type-platform-where-storage-for-each-user-would-max-out-at-2gb-a-month-500mb-a-day The monthly costs range around 1500,- and with a user base of 10million the assumed cost per user can be: 0,00015- cloud hosting costs cent per user. How to turn this into profit? We'll use an example that has more pricing options available, such as ads, sponsorships & partnerships and user-subscriptions. Assuming that subscriptions are the least desired: .. image:: https://i.imgur.com/QxmUA80.png **Ads** - 18,71 per thousand clicks - 80.000 clicks by users each month to pay hosting purely with ads - Assumed monthly active users view 10 ads per month averagely - CTR(Click-through-rate) of 1.8% - 1.000.000 (users) * 10 (ads) / 100(get 1 percent) * 1,8(CTR-rate) * 18,71 (profit per thousand clicks) - 3.367.800,- **Subscriptions** Assuming $10 & $25 subscription 'packages' are available there would be a need for 1 user to have a subscription per thousand advertisement clicks. These subscriptions would likely stop ads from showing to these users. Since they use the site a lot, they skip out on a lot of impressions by doing so. **In context** The click through-rate using the table above refers to the amount of people clicking on Google Ads after seeing them. The example above has an estimation of 1 million monthly active users, that would imply that the platform could have 180.000 monthly(1,8% of total user base) clicks on ads by its users. Brian also mentions VERY active users, for the context of this annex lets assume that this entails subscribers. **Total:** 100.000 (1% of userbase) ($1.000.000) 25.000 (0,25% of userbase) ($625.000) From subscribers: 1.625.000,- From total ads: 3.367.800,- Total: 4.992.000,- 0.50,- profit per user. 0.49985,- profit per user after hosting . As you can see, hosting is only a fraction of the total amount of profit. Monolith & on premises ------------------------- Now lets assume that this platform is old school, I mean really *old-school* as in the entire stacks runs on one VPS provided by a regional provider. Using the same numbers from above, Ramses would have to be used by the majority of the population in the Netherlands(unlikely, unless it manages to bring food to your doorstep). As you can guess, the connectivity would be too strained for the application to have active users from outside west europe. You would need, at minimal: - 10GBit connection - Datacenter with retention & backups - Physical area with servers - Hardware for the servers - Energy costs - Security & compliance - Staff to set this up & manage - & much more. This application, then due to being a monolith, would perform slow, have networking issues, and its costs could easily be hundredfold compared to the strategy you should go for which is using microservices & cloud. Recognizing which services are going to be used more, and require more computing resources, and dividing them into containers is an excellent approach of doing this. There is a certain risk to this, however, as more and more companies become reliant on the cloud--should AWS, Microsoft & Google partner up who knows where the pricing might go to in the future.