Over a million developers have joined DZone.

Why TCP is Evil and HTTP is King

DZone's Guide to

Why TCP is Evil and HTTP is King

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

Nitpicker corner: If you tell me that HTTP is built on TCP I’ll agree, then point out that this is completely irrelevant to the discussion.

I got asked why RavenDB uses HTTP for transport, instead of TCP. Surely binary TCP would be more efficient to work with, right?

Well, the answer it complex, but it boils down to this:


Huh? What does Fiddler has to do with RavenDB transport mechanism?

Quite a lot, actually. Using HTTP enable us to do a lot of amazing things, but the most important thing it allows us to do?

It is freaking easy to debug and work with.

  • It has awesome tools like Fiddler that are easy to use and understand.
  • We can piggyback on things like IIS for hosting easily.
  • We can test out scaling with ease using off the shelf tools.
  • We can use hackable URLs to demo how things work at the wire level.

In short, HTTP it human readable.

For that matter, I just remapped the Changes API solely for the purpose of making it Fiddler friendly.

Coming back again to building pro software, making sure that your clients and your support team can diagnose things easily.

Compare this:


To this:

There is an entire world of difference between the quality that you can give between the two.

And that is why RavenDB is using HTTP, because going with TCP would mean writing a lot of our own tools and making things harder all around.

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}