News for hackers. Stuff that matters.

asymptotic

At AWS, the hierarchy of service priorities is crystal clear: Security, Durability, and Availability. In that order. Durability, the assurance that data will not be lost, is a cornerstone of trust, only surpassed by security. Availability, while important, can vary. Different customers have different needs. But security and durability? They're about trust. Lose that, and it's game over. In this regard, InfluxDB has unfortunately dropped the ball.

Deprecation of services is a common occurrence at AWS and many other tech companies. But it's never taken lightly. A mandatory step in this process is analyzing usage logs. We need to ensure customers have transitioned to the alternative. If they haven't, we reach out. We understand why. The idea of simply "nuking" customer data without a viable alternative is unthinkable.

The InfluxDB incident brings to light the ongoing debate around soft vs. hard deletion. It's unacceptable for a hard delete to be the first step in any deprecation process. A clear escalation process is necessary: notify the customer, wait for explicit acknowledgement, disable their APIs for a short period, extend this period if necessary, soft delete for a certain period, notify again, and only then consider a hard delete.

The so-called ["scream test"](https://www.v-wiki.net/scream-test-meaning/) is not a viable strategy for a cloud service provider. Proactive communication and customer engagement are key.

This incident is a wake-up call. It underscores the importance of data durability and effective, respectful customer communication in cloud services and platform teams. Communication is more than three cover-your-ass emails; it's caring about your customers.

I misread the article when it stated:

> Traffic regularly exceeded 1,500 queries per second (QPS) at peak times

It may be quite cost prohibitive to use a managed service like AWS Global Accelerator.

While HTTP3 does provide some improvements, it's clear that further optimizations are needed, particularly for users in Europe and Asia.

One potential solution that hasn't been discussed much here is leveraging AWS managed services like AWS CloudFront or AWS Global Accelerator. It's worth noting that Dropbox's website already uses AWS CloudFront, so they are already leveraging AWS in some capacity. Based on my cost calculations, using AWS CloudFront would cost around $40k a month, while AWS Global Accelerator would be around $22k a month.

As of August 22, 2022, AWS CloudFront supports terminating HTTP/3 in a Point of Presence (POP), which could potentially help with the latency issues Dropbox is facing. AWS Global Accelerator, on the other hand, is designed to improve the performance of applications by terminating UDP/TCP as close to users as possible then routing user traffic through the AWS global network infrastructure. This could help reduce latency by ensuring that user traffic is routed through the most optimal path, even if the user is located far from a Dropbox data center.

It's hard to estimate what the potential latency reduction of using e.g. AWS Global Accelerator is, especially at higher percentiles. However, using https://speedtest.globalaccelerator.aws/, and assuming symmetry, my connections to Asia are 35-40% lower latency.

Of course, there are trade-offs to consider when using managed services like AWS CloudFront and AWS Global Accelerator. While they can provide significant performance improvements, they also come with additional costs and potential vendor lock-in. However, given the scale of Dropbox's operations and the importance of providing a fast, reliable search experience for their users, it may be worth exploring these options further.

---

Cost estimates

Assumptions:

    1. Dropbox's peak traffic is 1,500 queries per second (QPS).
    2. Average data transfer per query is 100 KB.
    3. 50% of the traffic comes from North America, 25% from Europe, and 15% from Asia (remaining 10% from other regions, for pricing purposes put it into Asia's calculations).
---

1) AWS CloudFront cost estimation:

    Data transfer:
    - North America: 1,500 QPS * 0.5 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 194.4 TB  
    - Europe: 1,500 QPS * 0.25 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 97.2 TB  
    - Asia: 1,500 QPS * 0.25 * 100 KB * 60 seconds * 60 minutes * 24 hours * 30 days = 97.2 TB

    Data transfer cost:
    - North America: 194.4 TB * $0.085/GB = $16,524
    - Europe: 97.2 TB * $0.085/GB = $8,262
    - Asia: 97.2 TB * $0.120/GB = $11,664

    Total data transfer cost: $16,524 + $8,262 + $7,006 = $36,200

    HTTP requests:
    Total requests: 1,500 QPS * 60 seconds * 60 minutes * 24 hours * 30 days = 3,888,000,000

    Using the updated AWS CloudFront pricing (as of May 22, 2023):
    - HTTP requests cost: 3,888,000,000 * $0.0075/10,000 = $2,916
Total estimated monthly cost for AWS CloudFront: $36,200 (data transfer) + $2,916 (HTTP requests) = $40k

---

2) AWS Global Accelerator cost estimation:

    Data transfer:
    - Total data transfer: 194.4 TB (NA) + 97.2 TB (EU) + 97.2 TB (Asia) = 388.8 TB

    Using the updated AWS Global Accelerator pricing (as of May 22, 2023):
    - Data transfer cost (averaged across regions): 388.8 TB * $0.035/GB = $13,608
    - (Also need to add EC2 egress cost, 388.8 TB * $0.02/GB = $7,776
    - Total data transfer cost = $21,384

    Accelerator:
    - Assuming 1 accelerator with 2 endpoints (1 for HTTP/2 and 1 for HTTP/3)
    - Accelerator cost: 1 * $18/accelerator/day * 30 days = $540
Total estimated monthly cost for AWS Global Accelerator: $21,384 (data transfer) + $540 (accelerator) = $22k
I’m familiar with Lambda and DynamoDB. When I left in 2022 they both had strong automated or semi-automated AZ evacuation stories.

I’m not that familiar with S3, but I never noticed any concerns with S3 during an AZ outage. I’m not at all familiar with Aurora Serverless or ECS.

For all AWS services you can always ask AWS Support pointed, specific questions about availability. They usually defer to the service team and they’ll give you their perspective.

Also keep in mind that AWS teams differentiate between the availability of their control and data planes. During an AZ outage you may struggle to create/delete resources until an AZ evacuation is completed internally, but already created resources should always meet the public SLA. That’s why especially for DR I recommend active-active or active-“pilot light”, have everything created in all AZs/regions and don’t need to create resources in your DR plan.

Re:Google Cloud region currently down due to water intrusion on Thursday April 27, 2023 @05:37PM (#35734946)
When I worked at AWS there was a similar scenario in eu-west-2. There was a fire in one of the availability zones (AZs). The fire suppression system kicked in and flooded the data center up to ankle or knee height. All the racks were powered off and the building was evacuated for hours (I don't remember the duration of the evacuation) until the water was pumped out.

But for the service team I worked for, our AZ-evacuation story wasn't great at the time and it took us tens of minutes to manually move out of the AZ, but at least there wasn't a customer-visible availability impact. Once we did it was just monitoring and baby-sitting until we got the word to move back in, I think it was 1-2 days later.

If you operate on AWS you work with the assumption that an AZ is a failure domain, and can die at any time. Surprisingly many service teams at AWS still operate services that don't handle AZ failure that well (at the time). But if you operate services in the cloud you have to know what the failure domain is.

In a technical blog or dashboard I like to see

1) avg mean (for throughput estimates), 2) p50 (typical customer / typical load), 3) p90 / p99 / p99.99 (whatever you think your tail is) 4) p100 (max, always useful to see and know, maybe p0).

Or throw in a histogram or kernel density estimate, sometimes there are really interesting patterns.

I’ve never seen a technical blog give such traffic or latency details though.

Edit: reading other comments, please do not read this as diminishing this blog post or Discord, great clear writing and impressive solution to an interesting problem.

Re:Log4jmemes.com: for those of us that need a laugh on Wednesday December 15, 2021 @11:58AM (#29568553)
If you walk as if you’re happy, talk as if you’re happy, and quack like a happy person, then you are happy.

This is the Way.

Re:Monoio – A thread-per-core Rust async runtime with io_uring on Thursday December 09, 2021 @12:45PM (#29500527)
> the best you can do is write a thread pool that spawns a Tokio LocalSet to run !Send futures

Can you go into this a bit more or provide a code reference? I'm new to writing async Rust code and am interested in this idea.

Congratulations! I did the exact same thing; made an app to help name my first child.

I've slowly developed a method which incorporates 1) culture, 2) popularity in different countries, and 3) pronunciation of names and attempts to recommend you names based on names you like. It kind of works, it's taken a lot of tuning to make it output something sensible. It's specifically designed to attempt to combine cultures together, which is a top request from customers I identified.

I've been working on releasing the app for a while. If you're interested in helping me test it before its release this month please feel free to sign up here:

https://www.reddit.com/r/namenerds/comments/qge6t9/im_lookin...

I will also look at this thread's comments closely before launching.

Re:Pressing YubiKeys on Friday October 02, 2020 @07:16PM (#24667996)
FWIW Amazon / AWS also use YubiKeys.
https://docs.aws.amazon.com/ram/latest/userguide/working-wit...

“To identify the location of your resources relative to your accounts, you must use the AZ ID, which is a unique and consistent identifier for an Availability Zone. For example, use1-az1 is an AZ ID for the us-east-1 Region and it is the same location in every AWS account”

So each separate AWS account will have a different AZ name that maps to use1-az1, but use1-az1 is a region-wide constant.

Re:Toddlers who use touchscreens show attention differences on Wednesday August 19, 2020 @11:31AM (#24211435)
I haven’t read the paper. But if the researchers were bringing in children regularly for testing involving eye tracking equipment, why not also test their ability to manipulate physical objects, recognize faces, and track faces? That all seems like low hanging fruit.
There is a quote from Jeff Bezos: "Good intentions never work, you need good mechanisms to make anything happen.". Hence at Amazon (ideally) any suggestion that a manual step or bureaucratic approval could improve a process is always naturally followed up by “But what happens when good intentions fail? We need a plan for a mechanism”. At least this is the theory, and how Amazon and AWS avoid accruing manual steps with no plan to automate them.
Re:Serverless LAMP stack on Monday June 15, 2020 @01:20AM (#23524045)
You are correct, I misread this.
Re:Serverless LAMP stack on Sunday June 14, 2020 @05:43PM (#23521638)
API Gateway came out with a cheaper variant (called HTTP APIs, admittedly a poor name) that is $1 per 300 million requests (114 requests per second for a month): https://aws.amazon.com/api-gateway/pricing/

You can also hook up an Application Load Balancer to Lambdas if that works for you: https://aws.amazon.com/elasticloadbalancing/pricing/

Re:How we use Rust in our mobile SDK on Tuesday April 28, 2020 @05:39PM (#23012440)
I successfully used Rust to create a shared library in a Flutter project that works on both iOS and Android. So far I've only published the iOS app: https://apps.apple.com/us/app/ezmempass/id1490538369

I heavily relied on the following blog post: https://dev.to/robertohuertasm/rust-once-and-share-it-with-a...

Overall it's painful to set up and requires knowledge of the native platform (XCode/Swift, Android Studio/NDK/Kotlin), but overall it works and it was fun getting it working.

I'm happy to answer more questions about it, I've been meaning to write up the experience and details.

Re:The good parts of AWS: a visual summary on Tuesday March 17, 2020 @06:58PM (#22611530)
I agree that AWS doesn't yet provide a clean all-in-one package for static website hosting. I think AWS Amplify Console [1] is the current official "all-in-one" service but I haven't used it.

With the recent GA of AWS CDK [2] I would say that it is getting more and more possible to define your own development workflow that is tailored to your own static website hosting needs and better than just raw S3. AWS CDK is still difficult to use with some rough edges, and I know that setting up e.g. a CodePipeline and CI/CD is difficult.

Here is the CDK example for hosting a S3 origin + CloudFront CDN + custom TLS certificate + CloudFront invalidation on deployments static website [3]. Here is my personal version of it combining Hugo that took me a day to set up [4]. Still complicated, lot of rough edges, but offers a pleasant dev experience [5], I haven't yet built up a CI/CD pipeline.

Disclaimer: I work for AWS but my views are my own.

[1] https://aws.amazon.com/amplify/console/

[2] https://aws.amazon.com/cdk/

[3] https://github.com/aws-samples/aws-cdk-examples/blob/master/...

[4] https://github.com/asimihsan/asim_ihsan_io/blob/master/cdk/s...

[5] https://github.com/asimihsan/asim_ihsan_io/blob/master/READM...

Re:Java ExecutorService with a blocking queue on Thursday February 04, 2016 @09:19AM (#11034021)
When would you want to block as you insert tasks into an ExecutorService already executing N concurrent tasks? Why not use "newFixedThreadPool" and don't block but stil keep a maximum of N concurrent tasks? Honest question, not snarky.
Re:Quiver: Programmer's Notebook for OS X on Tuesday February 02, 2016 @02:40PM (#11021880)
If you're on Mac just create a sparse encrypted DMG using Disk Utility, put it into Dropbox, bam you're done. http://blog.fosketts.net/2011/07/05/mac-dropbox-encrypted-vo...

I prefer applications to focus on one thing and do it very well, and leave other orthogonal functionality to other applications or the OS to then do the other parts very well. In this respect Quiver is well designed, I tip my hat to the author.

Re:Amazon's customer service backdoor on Sunday January 24, 2016 @06:49PM (#10964644)
I might be being pedantic, but the only mention of 2FA in the OP is:

"As a security conscious user who follows the best practices like: using unique passwords, 2FA, only using a secure computer and being able to spot phishing attacks from a mile away, I would have thought my accounts and details would be be pretty safe? Wrong."

Are you sure the author enabled 2FA on his Amazon retail account, or was it only enabled on his AWS account? The two systems do not share the same 2FA.

FYI I enabled 2FA on my Amazon retail account and when I called customer support they verified it. Once the verification failed and they refused to give me support.

Anyone else confirm a similar story with 2FA and support? Anyone willing to explicitly test this out?

Re:Amazon's customer service backdoor on Sunday January 24, 2016 @06:44PM (#10964620)
You can register for domains through AWS Route 53 and it'll automagically register on Gandi with WHOIS protection and link it up inside Route 53. You then don't need to leave the AWS UI, it just seems like it works magically.

(I think this is true...I can't remember now actually).

Re:The Three Cultures of Machine Learning on Friday January 22, 2016 @03:40PM (#10955458)
For the deep learning vertex the OP states:

"At the right vertex, we have Breiman's know-nothing approach—high-capacity models like neural nets, decision forests, and nonparametrics that will fit anything given enough data. This is engineering with less science (see these remarks). Deep learning people cluster here."

The phrase "will fit anything given enough data" is misleading and not correct about cutting-edge machine learning methods. "Fit" is a useless term, and you will instead find people talking about "bias" and "variance".

For any supervised method (you know the intended outputs) you apply to predict data, there are three sources of error: bias, variance, and random. Random error is some irreducible unpredictability that cannot be modeled. Bias occurs from bad assumptions made by the model itself (e.g. maybe the model is too simple). Variance is sensitivity to small changes in the data the algorithm is trained on.

High bias means the model is too simple to capture all the variations in the data set. High variance means the model is too overfit on the data at hand and it is not successfully generalizing to unseen data. In real-world problems there is a direct tradeoff between bias and variance. Nevertheless the goal of any supervised learning model is to have both low bias and low variance.

By splitting off a big (~10-20%) chunk of all data available into a "test" set, training the model on the remaining "train" set, then evaluating it on the "test" set, it's possible to estimate the generalizability of the model on future "unseen" data by whatever metric you want. By additionally plotting learning curves one can crudely estimate whether we have high bias or high variance.

Hence the insinuation that machine learning blindly "fits" data as much as possible is false. Sophisticated (yet not difficult) methods both minimize and estimate the generalizability of the model to future unseen data (minimizing variance), inevitably at the cost of some notion of accuracy (increasing bias).

I think the OP's objection is that such ML methods "know nothing". This is a trivial statement to make. Rather, I would turn the objection on its head and ask "If our methods achieve acceptable estimated generalizability on unseen data, do we need to know anything?". This reminds me of Alan Turing's arguments about machines passing the Turing Test vs. "are they really human?".

I was also concerned about this when I was looking into Arq, so I wrote a cross-platform restoration tool that'll also work on Windows and Linux (not just Mac): https://github.com/asimihsan/arqinator

This is purely based on the author's excellent description of the format in his arq_restore tool: https://www.arqbackup.com/s3_data_format.txt

Re:Crustache is a fast C implementation of Mustache on Tuesday August 30, 2011 @09:20AM (#2941281)
I love the author's complete disregard for what science actually is, and instead using the word as a synonym for something unstable and dangerous:

    "WHO KNOWS WHATS GONNA HAPPEN. DO IT FOR SCIENCE."
It reminds me of Looney Tunes cartoons' impressions of chemistry sets and scientists. Fun is often the best response to the natural question: "but what if I just do...that?"
Re:Cutting-edge IT firms need experts in 'dead' languages on Wednesday August 17, 2011 @09:10AM (#2895177)

    While our universities are turning out very
    able graduates, well versed in the sexy new
    languages of Java, .Net and the like...
...BUWAHAHAHAHHA. The number of serious problems with this statement gave me a good chuckle.
Re:Exercises for a programmer sitting by the PC all day on Wednesday August 17, 2011 @06:15AM (#2894774)

    It's the knowledge that no matter how sucky a
    day turns out to be, I have done something to
    better myself.
This, a hundred times. Especially if you do this first thing in the morning; keep this up on regular basis and you can rest assured that you're part of a very small elite. Of course, I provide no evidence to back up my assertion; part and parcel with being an elitist.

Older »