Join us
@irkdheeraj ă» Sep 01,2022 ă» 6 min read ă» 789 views
As the Solution Architect/CTO for a serverless SaaS startup, I analyze, test, and perform thorough research on the best practices for building a reliable, scalable, and cost-effective architecture.
During my research, I realized that the business problems must be properly phrased before I can begin solving them as an engineering challenge. So, I brainstormed with the business team and came up with the following 4 critical factor that defines success from a business & Tech prespective of the problem (Business â Tech) :
Assumptions:
We analyze each area using straightforward and simple questions that require consideration of the most important technical factors.
Latency
Business Questions:
Regardless of the sophistication of your architecture, the main concern is the user experience. In this context, user experience refers to latency and processing time.
Ensure you consider the following factors before responding to this question (NOTE: we are an analytics SaaS company):
We leverage over 42 AWS services to ensure the seamless operation of our complex application. Therefore, it is of the utmost importance that these services stay connected without issue. Any bottleneck in the pipelines or workflow orchestration code might lead to a considerable loss of computing time.
In a serverless world, time literally means money.
Therefore, we pay a high price for both in the form of a sluggish user experience caused by under-utilized computing services.
In many instances, the pace at which a business gets answers is dependent on a number of external factors such as data source API constraints, throttling difficulties, data processing logic, and computing-intensive algorithms.
Keep your customer informed, send notifications and emails, and try to optimize the process where you can cut the load time. If inevitable, ask UX designers to do the magic.
Cost
Business Questions: How much this feature is going to cost us?
Cost = FTE Capital cost + Recurring Infrastructure cost
FTE Capital cost: How long has your team spent building this feature?
You will not reinvent the wheel for every feature as a SaaS company. Before you begin coding, you and your development team spend a considerable amount of time on design and implementation. (If youâre a serverless startup like us, I recommend the serverless patterns at https://serverlessland.com/ for AWSâs best practices.)
I refer to the time spent defining a pattern, building it, and testing it ONCE before releasing a product as FTE capital cost. (please comment if the appropriate phrase exists)
Recurring Infrastructure cost: How much does the operation of this architectural component cost, each time it runs?
Each architectural workload MUST be developed keeping costs in place. Despite the popular belief of compute â cost, I still think that a well-defined design pattern AND data models can run your workloads efficiently without burning a hole in your pocket.
Disclaimer: Multi-tenant SaaS model billing is quite challenging to monitor. For the same reason, whenever my CEO inquired about the actual cost per tenant, I always provided him with the average cost per tenant. I have not established extensive billing, tagging, and logging in order to exactly compute tenant-level costs till 1 and half years into development (I strongly recommend setting it up in the very beginning to accurately track billing. I am writing a separate article soon on that)
Average Recurring Infrastructure cost= a1x1 + a2x2 + a3x3 + âŠ
where a1 is the billing unit price of the AWS service (sub-component) and x1 is the compute/storage usage. For example,
a1 â 1 DPU of Glue costs about $0.44/hour and
x1 â average usage/tenant = 25 min/day
so total glue billing is = 0.44 * 25/60
Disclaimer: This equation is far more complex to solve than this. This method of computation omits elements such as the number of DPUs utilized per job run, the cost of S3 requests, the cost of queues, and retry attempts. However, the exact computation is outside the scope of this article. I intend to write a separate essay about serverless SaaS billing soon
Security
Business Question: How safe and secure is this implementation?
The business team never inquire about firewalls, open ports, SSL, network access control lists, etc. They pose identical questions in their language, such as Firewall (everyone uses that these days), Control access to data, identity, configuration modifications, etc. As architects, it is our obligation to ensure that all queries are addressed in simple English.
For Serverless SaaS, Here are my responses:
Automation
Business Question: How can you improve productivity in terms of releasing a new feature?
The business team requires completion of all requirements yesterday, whereas we demand days or even months. Therefore, we both agree that this can only be accomplished by automating as many processes as feasible. Here is how we did it in a nutshell:
The best principles to implement are listed in the 6 pillars document below: https://aws.amazon.com/blogs/apn/the-6-pillars-of-the-aws-well-architected-framework/
I am looking forward to using the input to improve this article. Please do not forget to contribute your views and best practices that can assist us in building exciting Serverless Architectures.
Join other developers and claim your FAUN account now!
Influence
Total Hits
Posts
Only registered users can post comments. Please, login or signup.