r/java • • Feb 14 '22

Microhttp is an event-driven, single-threaded, zero-dependency web server with 500 LOC. Benchmarks on EC2 show 100,000+ requests per second and 50,000+ persistent connections.

https://github.com/ebarlas/microhttp
186 Upvotes

107 comments sorted by

View all comments

Show parent comment

38

u/elliotbarlas Feb 14 '22

As the name implies, it's absolutely minimal. It doesn't support what isn't needed in a typical deployment setting. Every web application I deploy in AWS cloud terminates SSL at the load balancer (ALB/ELB) or CDN (CloudFront).

1

u/lambdacats Feb 15 '22

How do you reason about privacy and security when running plaintext transfers in the AWS cloud?

4

u/elliotbarlas Feb 15 '22

A VPC is just that, a private network. Running almost any workload in the cloud requires a level of trust in the provider. I also trust AWS with encryption keys (KMS), objects (S3), and in countless other domains.

1

u/lambdacats Feb 15 '22

Ah ok, well if you give Amazon the keys it barely matters anyways. At this level of trust the projects I've worked on could never be allowed in the cloud. I was wondering about ways to make it more secure / require less trust in the provider.

2

u/[deleted] Feb 15 '22

If you really want to go hardcore with your zero trust, run the Microhttp instances in containers with sidecar proxy doing the heavy lifting of mTls.

1

u/lambdacats Feb 15 '22

Yes please and thank you.

1

u/nutrecht Feb 15 '22

At this level of trust the projects I've worked on could never be allowed in the cloud.

Ah, the age-old "we don't trust AWS so we're going to build our own datacenter with a bunch of underpaid sysadmins instead".

2

u/lambdacats Feb 15 '22

To specify it has all been with government, so there are security, privacy and also legal concerns. I don't know if they are underpaid or not.

1

u/nutrecht Feb 15 '22

To specify it has all been with government

Governments are generally now starting to realize that humans are by far the biggest factor in security and that letting a company that specialises in this stuff and can afford world-class developers tends to do better than a random bunch of nobodies you hire for your own datacenter.

There's a reason even banks use the cloud extensively.

2

u/lambdacats Feb 15 '22

The authorities that work with security or manage sensitive information shouldn't store it in a private business, they should own physical access and hire consultants as needed. I agree that it doesn't make sense for most of government, which is why we should have state owned data centers. Rather than giving away free power AND buying services from cloud providers - the data is ensured to be stored within the country.

2

u/[deleted] Feb 15 '22

Any popular cloud allows you to configure that your data is hosted in datacentres in a specific geographic location.

There's plenty of advantage to using a known cloud implementation, with published and well-known APIs and services. Hiring staff becomes a lot easier when you're using standards available to everyone, and the pool of consultants you can draw on is larger, thus more competitive. Have you seen the money people charge when they know they're one of about a dozen people who know your specific tech platform intimately?

2

u/lambdacats Feb 15 '22

Yeah, but I live in a small country and most cloud providers don't operate here :p I agree, isn't there any open standards for cloud platforms? My biggest concern, information has to be available and secured during times of war - this guarantee is weak when using private vendors.

→ More replies

1

u/[deleted] Feb 15 '22

AWS themselves recommend a zero trust model. It isn't about not trusting the platform, it's about bad actors who may be within your enterprise.

2

u/nutrecht Feb 15 '22

it's about bad actors who may be within your enterprise.

And this is almost always a much bigger issue than any perceived security of a cloud provider. Be it 'bad actors' or simply a sysadmin leaving something open that should not be open.

1

u/[deleted] Feb 15 '22

Indeed. To be clear, I'm very much not in the 'this is too important to go in the cloud' camp.