Should I host the website API and REST on the same server or split?

I have a web application consisting of a website API and REST. Should I host them on the same server or should I host them on different servers? By "server" I mean a cluster of servers - several servers behind a load balancer.

The API is mainly inbound traffic, the website is mainly outbound.

If it matters - hosted on Rackspace and / or AWS.

Here is what I see so far:

Benefits of using website API and REST on the same server

  • Easy deployment
  • Easy scaling - something slow - just run another instance
  • Single Load Balancing Configuration
  • Easy monitoring
  • Simple, simple, simple ...
  • Effective use of a full duplex network (API - inbound, outbound website)

Cleavage Benefits

  • API overloading does not affect site load time.
  • Detailed monitoring (I will know which component is currently using resources)

Any comments?

thanks

Alexander

+6
amazon-web-services scalability hosting
source share
3 answers

As you already stated, in most situations there are more advantages when hosting the API on the same server as on the website. Therefore, I would stick to this option.

But if you are predicting traffic allocation for a website or API, then perhaps a separate server would be more appropriate.

+2
source share

If it’s on a load balancer, why don’t you leave the services and pages on one site and not let the balancer / cluster do its job?

0
source share

Your list of advantages / disadvantages are operational considerations, but you must also consider the needs of the applications.

  • Caching
  • Security?
  • Other resources, i.e. file system

They may or may not apply, but if your application architecture is different from the two, be sure to consider this in your decision.

0
source share

All Articles