·조회수 51

Saving costs with MongoDB serverless

What is MongoDB Serverless?

The MongoDB developer provides MongoDB cloud services on their official website. By paying a fee, you can use a DB managed by the developer. Among the various models, I would like to talk about the Serverless model. This is a service where you pay based on the traffic you use. In other words, if there is no traffic, you do not have to pay. Below is a pricing table.

## When is it good to use?

Most initial projects have very little traffic. It is honestly financially burdensome to keep the DB running for a service with very little traffic. If you are being charged 20,000 won every month for a service that is not generating any revenue, you may wonder if you should shut it down, but if you use the serverless model, you don't have to worry about such things. Initial services have very little stored data and almost no read or write operations. As you can see from the pricing table above, in such cases, you don't have to pay a dollar a month. I myself have not paid a penny since starting the service from September to November.

## Are there any disadvantages?

Yes, there are. Due to the nature of the serverless model, if it is not used, the server shuts down. Therefore, if there is no traffic and then an attempt to connect is made, there may be a delay of about 1-2 seconds initially. The delay is not long enough for me to feel uncomfortable. Another disadvantage is that as the service scales, the cost may become more expensive compared to having a dedicated server always running. The reason I recommend the serverless model is because you can save money in the initial stages with very little traffic. As the service scales, compare the costs and consider moving to a dedicated server.

김지식
김지식
웹, 앱 개발자입니다.

댓글

댓글을 불러오는 중...