Today I’m going to answer a question from Sacha, the cofounder of a B2B marketplace. His question is…
How do I build a cloud-ready application and what does a stateless application mean?
Before answering this question, let’s add a bit of context.
Sacha and his cofounder already developed the first version of their product. They are now undertaking the Version 2 of their product, and are considering moving to Amazon Web Services, also known as AWS. AWS is a cloud provider, which means they provide servers and services to host your application.
In the previous video, we talked about the advantage of cloud solutions versus server hosting. But life is not that easy, especially when it comes to software development.
To take full advantage of a cloud solution, an application needs to be tweaked for a bit. And that is where I would like to introduce the concept of a stateful and a stateless application.
You might know that using a cloud architecture also means that your application will be replicated across several servers, allowing website visitors to use one or the other smoothly.
The point is that the application needs to save customers information, right? What if the information saved on a server is turned down a few seconds later? You cannot afford to lose customer information.
This is where the concept of stateful and stateless come into place.
Stateful vs stateless
- Stateful application – stores customer information and sessions on the local server
- Stateless application – stores customer information and sessions on a remote service
This is why there are two types of key services on the cloud.
Cloud services basics
- Application services – for running the application
- Storage services – for storing files, database, etc.
To make your application fully compatible with cloud solutions, you need to store your customer information in external services.
There are three types of information that you need to ask your developer to externalize.
Centralize on remote services
- Sessions (centralized on database or dedicated cache servers)
- Files (customer files, avatars, etc.)
This is the user information that is connected on your website. And we need to centralize all that information (user logins, passwords, usernames, etc.) on a centralized database or dedicated cache services like Redis, Memcached and others. This is already a bit technical, but you can't just ask your developer about this.
The second thing you need to centralize somewhere are the files like your customers’ files, avatar, pictures, etc. Usually, there are services like Amazon S3 that are well-known for this.
The third component that you need to centralize is of course the database. This is the easiest part.
So to conclude and answer Sacha’s question, let’s sum it up with a little drawing.
[/et_pb_text][et_pb_image src=”https://myctofriend.co/wp-content/uploads/2018/12/AskMyCTO-Cloud-provider-setup-1.png” _builder_version=”3.4.1″][/et_pb_image][et_pb_text _builder_version=”3.4.1″ text_font=”|300|||||||”]Now that you have a good understanding of how things work, just know that it’s exactly the same with other cloud providers. I mentioned, as an example, AWS, which is one of the popular cloud providers. But Google Cloud, Microsoft Azure, Heroku, IBM Cloud and others, work the same way.
If like Sacha, you have a specific question for your project, just go ahead and ask on myctofriend.co/ask.
I will do my best to answer your question by video or redirect you to any existing content that will answer it.
And also be sure to go through our other content here at myctofriend.co to learn more from real startup growth experiences and better manage your startup development.
I will be waiting for your questions, and I look forward to seeing you in other videos. Cheers.