Technology stack of SaaS or software product owners

reuse

Regular Member
Joined
Feb 9, 2013
Messages
417
Reaction score
811
I know there are at least a few SaaS owners here. Some may be in the process of building one.

What is your preferred technology stack?
What are your favorite programming languages and tools?
Where do you host your SaaS/product?
What kind of hosting do you use?

My technology stack varies, depending on what I want to build.

For a simple website, it is PHP scripts and HTML.

For something complex, I separate the front-end and backend.

Front-end is built using HTML, CSS and JavaScript, while the backend is built using any of the popular languages. I don't like to expose services outside, unless absolutely needed. Instead, I build a couple of services I can access privately. IP-based permissions are given to those services, so that no external entity can access them.

I use caching as much as possible to improve performance.

Depending on the situation, I may have a messaging service too, which works asynchronously.

I don't use any specific logging library, unless it makes the job easier.

Hosting: I have used several hosts, both EIG hosts and non-EIG hosts. My minimum requirement here is that I need shell access. I want to be able to do whatever I want within the area I have access to.
However, when the situation demands it, I am perfectly happy with using a cPanel based host.

Most of the time, I have a deployment script which does the job of moving my code from my development workspace to production.

One area where I am lacking right now is setting up a testing area mirroring production. I test locally, but that is only the module or component I changed. There is no integration testing - it typically happens in production :D
How do you guys do it?


This is about technology, so I am not discussing about integrating revenue generating mechanisms.
 
Last edited:
Sorry, meant to post this under Programming sub-forum. Mods, can you please move this thread?
 
Sorry, meant to post this under Programming sub-forum. Mods, can you please move this thread?
Thread moved.


What is your preferred technology stack?
What are your favorite programming languages and tools?
I've talked with many people who work on SAAS. Many choose either React/Nodejs or Ruby on Rails. Both of these stacks have enormous community behind it. Specially React.

I've recently fallen in love with GraphQL. So right now my favorite stack React for Frontend, Graphql (on nodejs) for backend.

Where do you host your SaaS/product?
What kind of hosting do you use?
For hosting I chose AWS. You can deploy your backend in a lambda function and don't have to worry about any server maintenance of any sorts. As for hosting the frontend, you can use s3 if it just a html/css/js. Or elastic beanstalk if it is complex.

The advantage of using a cloud solution like AWS is you can integrate other features (authentication, CDN, Logging) with each other seamlessly.

I am an AWS fanboy :p
 
Typescript/React/MobX for front-end, Typescript for Firebase Cloud Functions, react-native for native apps, Firebase Storage for database, BigQuery for analytics. Has been working pretty well for me as a Google Cloud Platform user. AWS is also great, but Firebase is a little more filled out for serverless.
 
For hosting I chose AWS. You can deploy your backend in a lambda function and don't have to worry about any server maintenance of any sorts. As for hosting the frontend, you can use s3 if it just a html/css/js. Or elastic beanstalk if it is complex.

Since lambda calls are mostly stateless, I guess you manage your sessions using Redux? Or just maintain state yourself in React?
 
Nodejs front-end, Python/Flask for back-end. Really depends on the project, though.
 
Typescript/React/MobX for front-end, Typescript for Firebase Cloud Functions, react-native for native apps, Firebase Storage for database, BigQuery for analytics. Has been working pretty well for me as a Google Cloud Platform user. AWS is also great, but Firebase is a little more filled out for serverless.

How is GCP, compared to AWS? Why did you choose GCP?
 
How is GCP, compared to AWS? Why did you choose GCP?
I've got significant AWS experience too, and I'd say overall they're both great, but each one has it's own particular pros and cons.

A few examples on the Google side:
- Google BigQuery provides particular flexibility for analytics without having to pay to provision CPU capacity.
- if you start going high-scale, then Google Kubernetes Endine is much better than the Amazon Kubernetes offering - partly because it was Google that created Kubernetes in the first place.

A couple of examples on the other side:
- Amazon RDS for Postgres is better keeping up with new Postgres versions than Google SQL
- Amazon offers SES e-mail service, Google doesn't have an equivalent

For me, I really like the Google Firebase service, which they bought as an acquisition a few years back, and is particularly well designed and integrated for providing serverless backends for web and mobile apps including functions, storage, auth.
 
Since lambda calls are mostly stateless, I guess you manage your sessions using Redux? Or just maintain state yourself in React?
Yes I use Redux for minor state management.

But this is where GraphQL shines.

If you use a React graphql client like apollo, you do not have to have your data in a redux store. The communication is directly from apollo client to graphql server. It caches your data. You have to tell it when to invalidate caches. It is pretty fucking cool.

Authentication data comes from AWS cognito, Data comes from graphql, you will only use Redux to manage minor states (filling and validating forms, UI changes etc).
 
Right now it would be React + Yii2 (as API) for me. Other than that, you could try React + Ruby On Rails, React + node too. As for DB, I would use mysql for yii2, mongo for node, or postgresql for ror.
 
Hosting - Organizing Cheap servers in a proper way to build my own cloud.
For front end Angularjs ,
Backend - Clickhouse . (no mysql or any other DB. nothing beats clickhouse if you know how to make use of it properly)
PHP
 
Backend - Clickhouse . (no mysql or any other DB. nothing beats clickhouse if you know how to make use of it properly)

Interesting choice. So what's the real advantage over mySQL/MariaDB, from a practical perspective?
 
A Simple and clear Advantage is the speed of processing data.

Hmm let me give a practical scenario :
i own an ad network saas platform. everyday there are billions of events in ad network including click, conversions etc.
especially the clicks table that need to store a large amount of data. practically over 10GB data per hour or so.

Now u cant use MYSQL for this . Mysql will start crying when any of your table exceeds over say 1 million Hits and that too is alot.
Creating any kind of report by querying that table is too slow .

ofcourse you may try to use mysql NDB cluster but its too complicated to setup and very hard to debug when a error appears and yet its performance is not up to the mark . in any case if you have any table that may have over 1 million row you should look for a nocloumn data structure ,in other words bigdata datastorage.

There are several bigdata system like cassandra, aerospike etc etc. i have used some of them but so far i love clickhouse as its very easy to setup ,and scale horizontally. for such system few million table is considered very tiny amount. so report generation is very very fast.

Note that i mentioned that i would be using clickhouse to store those billions of rows but trying to store them on the fly is stupid as you dont want your visitor to face any lag while your inserting/updating your data. in this case you need to use a messaging queue system like kafka. Clickhouse support easy connection with kafka.

in other words lets say when a visitor comes to your site you dont actually insert the row in the database directly but just store the json data in a text file. this text file then get read by a server daemon like 'filebeat' which continuous feeds the data to your apache kafka system , which in turn feeds data to your clickhouse storage.

Json data in text Files -> Filebeat -> Kafka -> clickhouse


If you want your saas to be fast enough then you must never use mysql except for some data which needs frequent updates as the only disadvantage of any bigdata system is the slow updates. for which mysql is good choice but again the data amount must be small. also never use a simple singular mysql database for storing your data. alteast use a Galera cluster of atlests 3 tiny mysql servers

Please note by SaaS i dont mean a system that consists of just a couple of server.

above is just one scenario.
lets talk about a simpler project i m currently working on i.e. scraping pinterest data and provind the data as an api.

You may guess how many profiles are there in pinterest. over 400 million easily. try storing that data in a mysql table even a server with 32 GB ram . and then run a query to select rows with where query say. 'select * from users where board_name like '%health%' and status='active' and country='US' limit 0,100' or something like that.
the speed wont look pretty at all.


This topic is too large to cover in merely a few paragraphs lol . if you want to discuss more let me know haha
 
A Simple and clear Advantage is the speed of processing data.

Hmm let me give a practical scenario :
i own an ad network saas platform. everyday there are billions of events in ad network including click, conversions etc.
especially the clicks table that need to store a large amount of data. practically over 10GB data per hour or so.

Now u cant use MYSQL for this . Mysql will start crying when any of your table exceeds over say 1 million Hits and that too is alot.
Creating any kind of report by querying that table is too slow .

ofcourse you may try to use mysql NDB cluster but its too complicated to setup and very hard to debug when a error appears and yet its performance is not up to the mark . in any case if you have any table that may have over 1 million row you should look for a nocloumn data structure ,in other words bigdata datastorage.

There are several bigdata system like cassandra, aerospike etc etc. i have used some of them but so far i love clickhouse as its very easy to setup ,and scale horizontally. for such system few million table is considered very tiny amount. so report generation is very very fast.

Note that i mentioned that i would be using clickhouse to store those billions of rows but trying to store them on the fly is stupid as you dont want your visitor to face any lag while your inserting/updating your data. in this case you need to use a messaging queue system like kafka. Clickhouse support easy connection with kafka.

in other words lets say when a visitor comes to your site you dont actually insert the row in the database directly but just store the json data in a text file. this text file then get read by a server daemon like 'filebeat' which continuous feeds the data to your apache kafka system , which in turn feeds data to your clickhouse storage.

Json data in text Files -> Filebeat -> Kafka -> clickhouse


If you want your saas to be fast enough then you must never use mysql except for some data which needs frequent updates as the only disadvantage of any bigdata system is the slow updates. for which mysql is good choice but again the data amount must be small. also never use a simple singular mysql database for storing your data. alteast use a Galera cluster of atlests 3 tiny mysql servers

Please note by SaaS i dont mean a system that consists of just a couple of server.

above is just one scenario.
lets talk about a simpler project i m currently working on i.e. scraping pinterest data and provind the data as an api.

You may guess how many profiles are there in pinterest. over 400 million easily. try storing that data in a mysql table even a server with 32 GB ram . and then run a query to select rows with where query say. 'select * from users where board_name like '%health%' and status='active' and country='US' limit 0,100' or something like that.
the speed wont look pretty at all.


This topic is too large to cover in merely a few paragraphs lol . if you want to discuss more let me know haha

Google BigQuery is also fantastic at these kind of scenarios, and if you don't query it too frequently then it can be pretty cheap to run (however costs quickly mount if you do have a large volume of queries ...)
 
There are several bigdata system like cassandra, aerospike etc etc. i have used some of them but so far i love clickhouse as its very easy to setup ,and scale horizontally.

I wanted to keep my question simple, so didn't mention NoSQL, but this was the real question I had in mind. Thanks for answering that :)
OK, so it is relatively easier to set up and scale.

Note that i mentioned that i would be using clickhouse to store those billions of rows but trying to store them on the fly is stupid as you dont want your visitor to face any lag while your inserting/updating your data. in this case you need to use a messaging queue system like kafka. Clickhouse support easy connection with kafka.

in other words lets say when a visitor comes to your site you dont actually insert the row in the database directly but just store the json data in a text file. this text file then get read by a server daemon like 'filebeat' which continuous feeds the data to your apache kafka system , which in turn feeds data to your clickhouse storage.

Any language supporting event listeners/callbacks and asynchronous programming may be able to do the same, but I guess it is about scalability, ease of use and following the well-trodden paths.
Admittedly, I haven't tried this out at such volumes.

Note that i mentioned that i would be using clickhouse to store those billions of rows but trying to store them on the fly is stupid as you dont want your visitor to face any lag while your inserting/updating your data. in this case you need to use a messaging queue system like kafka. Clickhouse support easy connection with kafka.

in other words lets say when a visitor comes to your site you dont actually insert the row in the database directly but just store the json data in a text file. this text file then get read by a server daemon like 'filebeat' which continuous feeds the data to your apache kafka system , which in turn feeds data to your clickhouse storage.

Writing to a file usually has more overhead than keeping it in memory and sending it directly, but I guess in your case, the volume of data is the key determining factor. Still, probably you can pass it directly across as streams?


if you want to discuss more let me know haha

It is the programming forum, I guess it is OK. At least for me, discussing with people in the trenches trumps theoretical discussions :)

Your volume of data is a LOT. How do you store it? What kind of total data volume are we talking about?
 
Writing to a file usually has more overhead than keeping it in memory and sending it directly, but I guess in your case, the volume of data is the key determining factor. Still, probably you can pass it directly across as streams?
Your volume of data is a LOT. How do you store it? What kind of total data volume are we talking about?

i Agree . writing to flat files involves little more overhead but again it depends on how you are doing it. the most important problem is the size of flat files. i create one file for every minute so size isnt the problem . another overhead is if you try to read or edit anything in the file. again i dont do that . the only thing i need flat files is for storing the data in json format so that filebeat can pick it up later.

i still get he best reliability this way. connecting directly to the kakfa stream is not an option as its very slow for the PHP.
As "Connecting to anything third party server on the fly" means a huge overhead in itself.
Keeping the data in the memory is again not a option for my usecase as it will increase the server cost for me. also if something happens to the server i will loose all the data that existed in the ram .cant afford that. so these flat also act as a low class backups in the wort case scenario. i accept that i havent done much research on this yet.

in my current setup one 32 GB ram server can handle anout 200-250 traffic Hits per second . which is the best performance so far i could find with my limited knowledge. However there is definitely a better solution out there but so far i havent found it yet hehe.
I keep hearing that "GO" will be the best choice for my scenario but i never got time to learn it .

Your volume of data is a LOT. How do you store it? What kind of total data volume are we talking about?

on an avg i get about 100-300GB of new data every day . i keep these bulk data for about 1 month . after which i only keep the summary.
i store the data in replicated and sharded system to achieve both 'high availibility' and 'high scalability'

example :
Please note that i donot need SSD because the way i am organizing my cluster is giving me all the speed and reliability an SSD on amazon cloud can provide me. and i am doign it at less then a third cost.

anyway here is how i usually store my data : one database involves 6 servers. each server 32GB ram, 2TB HDD

first of all database is split into twoshards. lets call it SA1, SB1
In case you dont know what sharding is. consider this. if a table has say 1000 rows then about 500 rows will be stored in server SA1 , 500 in server SB1
sytsem will split the data evenly among the shards.

Next each shard has 3 replicas
so the data in SA1 will be replicated in server SA2 and SA3
data in SB1 will be replaicted in server SB2 and SB3

Why 3 servers in each replica set. for that you have to figure out what 'quorum' is.
so total 6 server. even if any one of -two server goes down at eny point of time you will not face any database downtimes.

-----------

ANyway forget about whatever i said above all the above stuff was for my own usecase. what you need might be different and probably wont need such complicated setup. what exactaly are you looking for. if you could tell me a rough idea about your requirement i might be able to help you suggest something perhaps.
 
i Agree . writing to flat files involves little more overhead but again it depends on how you are doing it. the most important problem is the size of flat files. i create one file for every minute so size isnt the problem . another overhead is if you try to read or edit anything in the file. again i dont do that . the only thing i need flat files is for storing the data in json format so that filebeat can pick it up later.

i still get he best reliability this way. connecting directly to the kakfa stream is not an option as its very slow for the PHP.
As "Connecting to anything third party server on the fly" means a huge overhead in itself.
Keeping the data in the memory is again not a option for my usecase as it will increase the server cost for me. also if something happens to the server i will loose all the data that existed in the ram .cant afford that. so these flat also act as a low class backups in the wort case scenario. i accept that i havent done much research on this yet.

in my current setup one 32 GB ram server can handle anout 200-250 traffic Hits per second . which is the best performance so far i could find with my limited knowledge. However there is definitely a better solution out there but so far i havent found it yet hehe.
I keep hearing that "GO" will be the best choice for my scenario but i never got time to learn it .



on an avg i get about 100-300GB of new data every day . i keep these bulk data for about 1 month . after which i only keep the summary.
i store the data in replicated and sharded system to achieve both 'high availibility' and 'high scalability'

example :
Please note that i donot need SSD because the way i am organizing my cluster is giving me all the speed and reliability an SSD on amazon cloud can provide me. and i am doign it at less then a third cost.

anyway here is how i usually store my data : one database involves 6 servers. each server 32GB ram, 2TB HDD

first of all database is split into twoshards. lets call it SA1, SB1
In case you dont know what sharding is. consider this. if a table has say 1000 rows then about 500 rows will be stored in server SA1 , 500 in server SB1
sytsem will split the data evenly among the shards.

Next each shard has 3 replicas
so the data in SA1 will be replicated in server SA2 and SA3
data in SB1 will be replaicted in server SB2 and SB3

Why 3 servers in each replica set. for that you have to figure out what 'quorum' is.
so total 6 server. even if any one of -two server goes down at eny point of time you will not face any database downtimes.

-----------

ANyway forget about whatever i said above all the above stuff was for my own usecase. what you need might be different and probably wont need such complicated setup. what exactaly are you looking for. if you could tell me a rough idea about your requirement i might be able to help you suggest something perhaps.

Thanks for taking the time to share the details. That helps.

Yes, as you surmised, my use case is a bit different. I started with a tiny prototype and am hitting the limits now when I scaled it.
I know I can go with GCP or AWS and call it a day, but want to do something similar to what you're doing.

The data volume you are processing is in line with what I am planning to do. Trying to avoid sharding by planning to use multiple instances and syncing periodically - that is all I will need for now, for my use case. I plan to store keys starting with a-j, k-t and u-z in three different instances. Yes, I am running away from complexity but I know I will have to face it later :)

I do have the advantage of native threads - so I can do async calls with minimal overhead. I can see how PHP can kind of be a bottleneck there: https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/binarytrees.html


I will share my final setup once it is all working. I may hit you up as well, as I go along. Thanks again, for the information about your stack :-)
 
Bump.

How do you guys keep your hosting costs down?

Deleted member 923340 How much does your AWS hosting cost come to? I guess once you scale, your cost will go all the way up.

@rb32 You seem to be using GCP - what's your monthly cost? Any surprises so far?

@sunnybay I guess with DO, your costs are very minimal. Spin a droplet and start using it, drop it when you don't want it anymore. Is it still the same?

@DigitalWizard @TIBHD @Gogol: You didn't mention anything about your hosting costs - are you using VPS or shared hosting?

@neOtron: So this is something I wanted to ask a month back - what is your biggest cost? How much did it increase as your volume went up?
 
Back
Top