1

I am new to aws. I hosted my .net website on aws last month via Elastic Beanstalk. Its a simple 5 page .net core website and do not have any database. The users are also too few.

Now the problem is I got the bill of the month where elastic load balancing charge is very high(almost 95%). My question is:

  1. Do I need elastic load balancing service to run my website? Can't it be done without it.

  2. If I will delete the elastic load balancing than what happen? Is there a way to disable it for a while and check?

  3. If elastic load balancing is necessary than how can I control its use to minimum level or optimize it for low cost?

Ok, now the below answers partially resolved my problem. Now when I am changing my instance to single instance I am getting the below error: Error Load Balancing

Anurag
  • 111
  • 8
  • Does this answer your question? [Elastic Beanstalk without Elastic Load Balancer](https://stackoverflow.com/questions/8014046/elastic-beanstalk-without-elastic-load-balancer) – Martheen Oct 30 '20 at 04:41
  • With ELB there is no fixed cost and depends on the usage. It's a bit surprising that 95% of the billing happens for ELB and not for the backend infrastructure. Can you check the cost again? – Praveen Sripati Oct 30 '20 at 05:19

2 Answers2

2

Do I need elastic load balancing service to run my website? Can't it be done without it.

Yes, you can change your EB environment from load-balanced, to single-instance type. The single-instance does not use load balancer. It is only a single instance with elastic IP.

If I will delete the elastic load balancing than what happen? Is there a way to disable it for a while and check?

Thinks will break if you delete it manually. The correct way is to use EB configuration options to change from load-balanced to single-instance. What happens then, it depends on what you use the load balancer for? For example, if you use it for SSL certificates, you will loose HTTPs, and will have to set it up differently.

If elastic load balancing is necessary than how can I control its use to minimum level or optimize it for low cost?

Its not necessary. That's why single-instance EB environment exists.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • Thanks, partially solved my problem. Now I am trying to change to single instance type but getting the following error. Validation Error Invalid XSRF Token – Anurag Oct 30 '20 at 05:56
  • @Anurag This seems to be specific to your application. Maybe you used SSL, and now not, so you get errors? – Marcin Oct 30 '20 at 06:02
  • I don't know this error disappears automatically after some time. But now my website is not opening with https but only through http. How I regain my https with single instance – Anurag Oct 30 '20 at 06:17
  • 1
    @Anurag You need to set it up manually yourself on the instance. There are many tutorials on doing this. One example is [here](https://www.tutcodex.com/ssl-on-single-instance-elastic-beanstalk-tutorial/). You have to find one, specific to your application. – Marcin Oct 30 '20 at 06:31
1

Do I need elastic load balancing service to run my website? Can't it be done without it.

Ofcourse your website can run without a load balancer, load balancer is used when you have too many traffic on your website and you don't want to overload your single instance. In such a case load balancer evenly balances the load across different instance.

it provides a single dns name for your website through which all traffic enters ( another reason why people use load balancer)

If I will delete the elastic load balancing than what happen? Is there a way to disable it for a while and check?

if you a provision load balancer through beanstalk then deleting it manually will definitely break things, instead change your environment configuration to single instance, and as @marcin pointed out other things will also be taken like https,load balancer health of ec2 instances,stickiness with cookies. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-types.html

If elastic load balancing is necessary than how can I control its use to minimum level or optimize it for low cost?

Totally depends on the traffic on your website and the capacity of your instance. if your instance is big enough in terms of computing, memory no need of load balancer.( if its big ,naturally your instance will be free to cater all the request).

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67