Back
Max Makarochkin

Maybe a 1 year subscription? How much traffic do you have?

Would that be legal? We get around 60 distinct users per day.

Consider reading more about OKRs: en.wikipedia.org/wiki/OKR it's a good way to set realistic goals when you run a business.

Hey Sarup, there is one story that may be interesting to you:
www.indiehackers.com/intervie…
amplifr.com/

It looks like their situation was similar to yours.
TL;DR they looked at what features were used the most and removed everything else. Only then scaled it.

Hey Shabrina. Maybe that helps:

blog.ycombinator.com/getting-…
www.upbeatpr.com/
500.co/pr-for-startups-the-ar…

Have never tried it myself (yet), but it looks like there are solid SaaS solutions which help you with lean PR services.

I would consider another pattern, Swizec. There is one, which is actively used by D3.js. Basically you create an object and then each instance method returns that object back. This way you can create a neat chain of settings without any ugly config objects or time consuming DSL. Example: instance = new Instance(); instance.setMemory(300).setStorage(1000).setMemoryAlertThreshold(0.8).start(). There is no context of what you work on, but hope it helps.

What tool are you using? Probably a way to go could be using Segment.io. By using Segment or (Analytics.js) you won't depend on a specific tool. Anyway, you could treat every new signup as a trial user unless proved the opposite. So you call new user a lead. Then you register a purchase event when it happens. Purchased/Leads would be the conversion you are looking for. Heap, Mixpanel allow you to do so.

You can implement any service you want fully on serverless unless you need to use Websocket (then you'd need to combine serverless API with a traditional server). To avoid race conditions you can look into transaction locking (ex: in Postgres): stackoverflow.com/questions/4… or you can set flags with a Redis caching layer. The reason why you should always close your DB connections is that functions create a new connection on each invocation. Considering that it's infinitely scalable, we get a bottleneck at the DB level. So your database solution should be ready to handle thousands of connections at the same time.

Thank you 🙌

I have no doubts now & if I have any when I actually build it, I will ask you later on. Thanks Max :)

I've tried many. Heap analytics is the most convenient for me. No need to track events manually. Good stuff.

Hi Akshay,
"Serverless will scale infinitely, although it has 1 small cost of cold starts but if the site is used regularly then cold start is not needed." - there are solutions that fix it, example: github.com/FidelLimited/serve…

Me and my teammates have been using serverless technologies for a while. This is what we've learned:
1. Running Lambda functions is much cheaper for simple computationally intensive operations.
2. Traditional way of dealing with databases is not a good fit for serverless. Make sure that your DB server is ready to handle hundreds of simultaneous connections. Always close DB connections by the end of each lambda invocation.
3. Use terraform, cloudformation or serverless.js config to set up API endpoints, don't do it manually (otherwise it is a nightmare to set up staging or other envirionments).
4. Long running tasks (like log processing, etc.) are better to do on a server instance.
5. Lambda functions are great for running CRON jobs (using cloudwatch scheduler).
6. Think of a centralized logging solution in advance (Papertrail is a good option).
7. Ideally set up caching with Redis (has unlimited connections) to reduce the load on your DB or consider trying AWS Aurora: aws.amazon.com/rds/aurora/ It's a Postgres compatible solution for the serverless era. Let me know how it goes.

You should think carefully of how to implement authentication properly. The best fit would be using a JWT token.

Tj has recently introduced Up, which helps to deploy serverless websites as well (not only APIs): github.com/apex/up

We prefer having a Heroku instance or a static website running on a server and then using serverless for the API, because the limitation is that you can't use Websocket without a server.

In general, it's definitely fun and cost efficient to build a cloud solution using serverless technologies.

Guys, hit me up on Telegram (@mac_r) if you have any other questions!

Best,
Max

Thank you for such a wonderful answer, Max 👏

Can you answer the question about the app in which I mention the 6 steps aboveâť“
I think its good for Serverless but not sure. Up is very good & I maybe use that or use Serverless Framework.

Also, regarding Databases I read during my Engineering that if 2 people perform the write operation simultaneously then it will probably have a race condition with incorrect values. How to solve thatâť“ I don't think its a serverless problem but if you can answer that :)

Also, whats the harm in keeping the database open❓Does it have any cost if I keep it open❓

You can implement any service you want fully on serverless unless you need to use Websocket (then you'd need to combine serverless API with a traditional server). To avoid race conditions you can look into transaction locking (ex: in Postgres): stackoverflow.com/questions/4… or you can set flags with a Redis caching layer. The reason why you should always close your DB connections is that functions create a new connection on each invocation. Considering that it's infinitely scalable, we get a bottleneck at the DB level. So your database solution should be ready to handle thousands of connections at the same time.

Thank you 🙌

I have no doubts now & if I have any when I actually build it, I will ask you later on. Thanks Max :)

Home
Search
Messages
Notifications
More

Are you sure?