Live data from Hacker News

Cloud, Why So Difficult?

winglang.io

41–50 of 158 posts

Re: Cloud, Why So Difficult?

#41

I'm sorry, what's the advantage to the cloud again? This just reminds me why I just run (my personal) web apps on the server in my basement: it's actually simpler. I really think the worst part of programming is dealing with the development environment.

Assuming you're being serious, the advantage of the cloud is scalability, avoiding managing hardware, reliable power, and reliable network. You want to run your web app off your basement server? Go ahead, but if you have a blog post that hits the front page of HN, there's no way to scale up. If your home server has hardware failure then you're out of luck until you can get new hardware. Your home has a power outage o…

> Assuming you're being serious, the advantage of the cloud is scalability, avoiding managing hardware, reliable power, and reliable network.

Or in reality, it's weird transient failures you can't debug, and unexpected bills for some asanine reason. And scalability sure seems like something to avoid until you actually need it (as in the demand on the site is large enough, not that your performance is so bad you can't handle traffic).

Obviously I can be more cavalier with my uptime, as it is a personal server.

Re: Cloud, Why So Difficult?

#42
post #34

"Cloud is too difficult, you have to learn tons of stuff to use it!" "BTW here's the new product I'm selling which requires you to learn a new cloud-oriented programming language and has its own CLI and has diagrams like [this]( https://docs.winglang.io/assets/images/arch-f803472c761aa198... ) on its introduction page!" The cognitive dissonance is overwhelming...

Isn't this how every single progress is made, though? [Literally anything] => "Hey, this is better" => [Better] => Repeat

Re: Cloud, Why So Difficult?

#43
post #34

"Cloud is too difficult, you have to learn tons of stuff to use it!" "BTW here's the new product I'm selling which requires you to learn a new cloud-oriented programming language and has its own CLI and has diagrams like [this]( https://docs.winglang.io/assets/images/arch-f803472c761aa198... ) on its introduction page!" The cognitive dissonance is overwhelming...

While I don't disagree entirely, I feel like you're misrepresenting what they're offering. Their language is an attempt at simplifying orchestration and application code. The diagram you're showing only proves that point - that's an AWS diagram, and the code on the same page is what creates it:

    bring cloud;

    let queue = new cloud.Queue(timeout: 2m);
    let bucket = new cloud.Bucket();
    let counter = new cloud.Counter(initial: 100);

    queue.addConsumer(inflight (body: str): str => {
      let next = counter.inc();
      let key = "myfile-${next}.txt";
      bucket.put(key, body);
    });
If they can deliver on their promise, it's actually promising. (I haven't evaluated it; just taking things at face value)

Re: Cloud, Why So Difficult?

#45
We decided to use DynamoDB as a cache for our expensive-to-compute statistics from the data warehouse so we can show them to users without putting a big read load on the data warehouse. DynamoDB scales really well right? And big statistics tables don't belong in the main app database. I'll build the statistics in our postgres data warehouse and use a little ruby script I wrote to push them from postgres to Dynamo with batch_write_item, shouldn't take long.

After spending a couple of days in terraform (I'm no infra expert) creating roles to assume, cross account permissions, modifying my script to assume those roles, figuring out the ECS run-task api syntax and some other things I'd rather forget about I kicked off the jobs to copy the data and left for the weekend. Sunday cost alert email put that thought out of my head: I just spent 8k USD on writing 2 billion rows to two tables because I misunderstood how Dynamo charges for write units. I thought I was going to spend a few hundred (still a lot, but our bill is big anyway) because I'm doing batch write requests of 25 items per call. But the dynamodb pricing doesn't care about API calls, it cares about rows written, or write capacity units, or something. OK, so how do we backfill all the historical data into Dynamo without it costing like a new car for two tables?

Apparently you can create new dynamodb tables via imports from S3 (can't insert into existing tables though) for basically no money (the pricing is incomprehensible but numbers I can find look small). Now I just need to write my statistics to line delimited dynamodb-flavored json in S3 (statements dreamed up by the utterly deranged). You need to put the type you want the value to have as the key to the value you see. A little postgres view with some CTEs to create the dynamodb-json and use the aws_s3.query_export_to_s3 function in RDS Postgres and I had a few hundred GB of nice special-snowflake json in my S3 bucket. Neat!

But the bucket is in the analytics account, and I needed the dynamo tables in the prod and staging accounts. More cross account permissions, more IAM. Now prod and staging can access the analytics bucket, cool! But they aren't allowed to read the actual data because they don't have access to the KMS keys used to encrypt the data in the analytics bucket.

OK, I'll create a user managed KMS key in analytics and more IAM policies to allow prod and staging accounts to use them to decrypt the data. But the data I'm writing from RDS is still using the AWS managed key, even after I setup my aws_s3_bucket_server_side_encryption_configuration in terraform to use my own managed key. Turns out writes from RDS to S3 always use the S3 managed key, no one cares about my aws_s3_bucket_server_side_encryption_configuration. "Currently, you can't export data (from RDS) to a bucket that's encrypted with a customer managed key.". Great. So I need to manually (yes I could figure out the aws api call and script it I know) change the encryption settings of the files in S3 after they've been written by RDS to my own custom key. And now, 4 hours of un-abortable dynamodb import jobs later, I finally have my tables in prod and staging in DynamoDB.

Now I just need to figure out the DynamoDB query language to actually read the data in the app. And how to mock that query language and the responses from dynamo.

At least I'm learning a lot...

Re: Cloud, Why So Difficult?

#46

I'm sorry, what's the advantage to the cloud again? This just reminds me why I just run (my personal) web apps on the server in my basement: it's actually simpler. I really think the worst part of programming is dealing with the development environment.

I use cloud to avoid exposing my home IP address.

This matters when you're an op in an IRC channel and someone joins the channel, starts spamming racial slurs, so you ban them, and they respond by DDoSing you.

If I had a dollar for every time it happened, I'd have $2, which isn't a lot of money but it's pretty annoying that it's happened twice. The first time, they only ran the attack for a few minutes. The second time it happened, they ran it for over an hour. Releasing and Renewing my WAN IP didn't stop the attack, because I still got the same WAN IP. I had to call my ISP support and spend way too long on the phone trying to talk to someone who knew what I was asking for to get a new IP address before I was able to dodge the attack.

Using AWS, I can configure security groups so that my VM never even sees the packets from a DDoS if I've configured them to only allow connections from my home IP.

Re: Cloud, Why So Difficult?

#47
post #29

The cloud is renting someone else's computer at a way higher price than it would cost you to use your own. If it makes things difficult, you shouldn't be using it. It is overhyped and it sucks for most use case.

With all due respect this is a trivial and misleading point of view. Of course if you have the staff you could do all the things they do in the cloud, on-premises. If you had the staff. And the skills. And the money. And you wanted to spend your finite devops resources deploying and monitoring a data center. Yes it’s possible to buy your own building, and your own DS3/OC3. And HVAC. And electrical. And backup generat…

Downvoted? Really?

Re: Cloud, Why So Difficult?

#48
post #47
post #29

Earlier quoted context omitted.

With all due respect this is a trivial and misleading point of view. Of course if you have the staff you could do all the things they do in the cloud, on-premises. If you had the staff. And the skills. And the money. And you wanted to spend your finite devops resources deploying and monitoring a data center. Yes it’s possible to buy your own building, and your own DS3/OC3. And HVAC. And electrical. And backup generat…

Downvoted? Really?

I dunno, I suspect hosting and cloud became one and the same thing some place in your post.

From what I understand you need both a large or complex computational load and a lot of traffic before clouds should become the weapon of choice.

But Im not entirely sure.

Re: Cloud, Why So Difficult?

#49
post #47
post #29

Earlier quoted context omitted.

With all due respect this is a trivial and misleading point of view. Of course if you have the staff you could do all the things they do in the cloud, on-premises. If you had the staff. And the skills. And the money. And you wanted to spend your finite devops resources deploying and monitoring a data center. Yes it’s possible to buy your own building, and your own DS3/OC3. And HVAC. And electrical. And backup generat…

Downvoted? Really?

I don’t think you deserve a downvote but I can give you my take having worked at a lot of places that did their own infra as well as cloud.

You don’t need to physically rack servers, lots of systems integration vendors and remote hands will gladly put servers together for you. Most colos will gladly help you figure out connectivity. And there are lots of vendors, like Cisco, who will deliver a rack to your datacenter with virtualization software installed and everything, plug and play..

My point is there isn’t an either/or choice of using the cloud or building the universe from scratch, there are so many available options in-between. And while those options aren’t available conveniently behind an API and might require a few old school phone calls, you can save millions of dollars, get access to better performing hardware, have better control over data sovereignty, and 90%less lock-in if you choose to go down that road. It’s not for everyone but a /lot/ of workloads that people are running in the cloud can be done better elsewhere.

Re: Cloud, Why So Difficult?

#50

If you want easy and simple, use Render, fly.io, etc. Those cover 90% of the cases K8s be damned.

> K8s be damned

I've noticed the frequency of K8s headlines has diminished. (Very) roughly two years ago you never saw a HN front page without one or more K8s headlines. I suspect it has saturated the market that it appeals to.

Post reply on HN