Hacker Newsnew | past | comments | ask | show | jobs | submit | reader_1000's commentslogin

I agree, any direct / field modification should be assumed to be not-thread safe. OTOH, I think Go made a mistake by exporting http.DefaultClient, because it is a pointer and using it causes several problems including thread safety, and there are libraries that use it. It would have been better if it were http.NewDefaultClient() which creates a new one every time it is called.


I think the original sin of Go is that it neither allows marking fields or entire structs as immutable (like Rust does) nor does it encourage the use of builder pattern in its standard library (like modern Java does).

If, let's say, http.Client was functionally immutable (with all fields being private), and you'd need to have to set everything using a mutable (but inert) http.ClientBuilder, these bugs would not have been possible. You could still share a default client (or a non-default client) efficiently, without ever having to worry about anyone touching a mutable field.


> We have identified the underlying issue with one of our cloud service providers.

Isn't it everyone using multiple cloud providers nowadays? Why are they affected by single cloud provider outage?


I think more often than not, companies are using a single cloud provider, and even when multiple are used, it's either different projects with different legacy decisions or a conscious migration.

True multi-tenancy is not only very rare, it's an absolute pain to manage as soon as people start using any vendor-specific functionality.


> as soon as people start using any vendor-specific functionality

It's also true in circumstances where things have the same name but act differently.

You'd be forgiven for believing that AWS IAM and GCP IAM are the same thing for example, but in GCP an IAM Role is simply a list of permissions that you can attach to an identity. In AWS an IAM Role is the identity itself.

Other examples; if you're coming from GCP, you'd be forgiven for thinking that Networks are regional in AWS, which will be annoying to fix later when you realise you need to create peering connections.

Oh and while default firewall rules are stateful on both, if you dive into more advanced network security, the way rules are applied and processed can have subtle differences. The inherent global nature of the GCP VPC means firewall rules, by default, apply across all regions within that VPC, which requires a different mindset than AWS where rules are scoped more tightly to the region/subnet.

There's like, hundreds of these little details.


Sounds like we’ve walked a similar path on this. Especially with IAM and network policies.

> There’s like hundreds of these little issues

Exactly. If it is a handful of things that is fine. It’s often as you describe.


I think there's some irony in Docker being impacted specifically, as they're one of the main tools to help achieve true multi-tenancy.


Depends on if you’re using Docker or Podman Desktop versus straight Docker/Podman and where you’re pulling your images from.


And even if you think it’s important enough to justify the expense and complexity, it’s times like this when you discover some minor utility service 1) is a critical dependency, and 2) is not multi-cloud.

Complex systems are hard.


Multi cloud is just a way to have the outages of both.


No, that's pretty rare, and generally means you can't count on any features more sophisticated than VMs and object storage.

On the other hand, it's pretty embarrassing at this point for something as fundamental as Docker to be in a single region. Most cloud providers make inter-region failover reasonably achievable.


Almost all cloud providers help here by having inter-region failures as well.

There are multiple AWS services which are "global" in the sense that they are entirely hosted out of AWS East 1


You can be multi-cloud in the sense that you aren't dependent on any single provider, or in the sense that you are dependent on all of them.


A bit like the ambiguity of search facets: if I select one facet, I get results that match, but if I add a second facet, should the results expand (OR'ing my selections) or contract (AND'ing my selections)? Presumably they should be OR'd if they belong to the same category (like selecting multiple colors, if any given result has only one color) but AND'd otherwise (like selecting a color and a size). But then a category could consist of miscellaneous features, and I want results that have every feature I've selected, which goes against the general case.


Not only they are not using multiple cloud providers, they are not using multiple cloud locations.


Because it's hard enough to distribute a service across multiple machines in the same DC, let alone across multiple DCs and multiple providers.


Because even if service A is using multiple cloud providers not all the external services they use are doing the same thing, especially the smallest one or the cheapest ones. At least one of them is on AWS East-1, fails and degrades service A or takes it down.

Being multi-cloud does not come for free: time, engineers, knowledge and ultimately money.


Multi cloud is not nearly as trivial as often implied to implement for real world complex projects. Things get challenging the second your application steps off the happy path


> Isn't it everyone using multiple cloud providers nowadays? Why are they affected by single cloud provider outage?

No? I very much doubt anyone is doing that.


> Isn't it everyone using multiple cloud providers nowadays?

Oh yes. All of them, in fact, especially if you count what key vendors host on.

> Why are they affected by single cloud provider outage?

Every workload is only on one cloud. Nb this doesn’t mean every workflow is on only one cloud. Important distinction since that would be more stable.


they are using multiple cloud providers, but judging by the cloudflare r2 outage affecting them earlier this year I guess all of them are on the critical path?


Looking at the landscape around me, no. Everyone is in crisis cost-cutting, "gotta show that same growth the C-suite saw during Covid" mode. So being multi-provider, and even in some cases, being multi-regional, is now off the table. It's sad because the product really suffers. But hey, "growth".


> For instance, a recurring comment in user surveys is about the lack of stack traces associated with an error. This could be addressed with support functions that produce and return an augmented error.

Languages with stack traces gives this to you for free, in Go, you need to implement it every time. OK, you may be disciplined developer where you always augment the error with the details but not all the team members have the same discipline.

Also the best thing about stack traces is that it gives you the path to the error. If the error is happened in a method that is called from multiple places, with stack traces, you immediately know the call path.

I worked as a sysadmin/SRE style for many years and I had to solve many problems, so I have plenty of experience in troubleshooting and problem solving. When I worked with stack traces, solving easy problems was taking only 1-2 minutes because the problems were obvious, but with Go, even easy problems takes more time because some people just don't augment the errors and use same error messages which makes it a detective work to solve it.


As an iPhone user, I can only agree that Apple's software quality is just going backwards. Keyboard is terrible, it suggests words that are completely unrelated. Control center is becoming worse at every update. You can't still select text in the messages. Wifi is always unstable. You can't turn off wifi, etc.

Also my father used to use the feature of announcing outgoing calls when call is made by Siri, they removed it and I saw that many blind people also used to use this feature. I don't know what they thought while removing this feature.


Yeah!!! What’s with their word prediction? More than 12 years and buggers still can’t predict my first name which I have typed a trillion times at least and is my name in the iOS and iCloud and contact and what not!!!!

The thing is slowly I am moving to so much non-Apple things that at one might I might go back to a much cheaper Android. Because anyway normal sized phones are not coming from Apple either.


Most companies out there want you to have certain technologies / keywords in your resume and will automatically reject you if you don't have them.

Yes, building a solid project with boring technology that delivers real business value sounds good in theory but not so good when applying for a new job. Maybe it can help after you somehow manage to pass some initial screening.


Agreed and they reject applications with the reason they hired somebody else, though keep posting here


One interesting thing I noticed with Linkedin emails is that it dynamically fetches unread notification count. For example, if someone views your profile, there will be a notification in the website. If you go to your mail and open an old Linkedin email before you check the notification in the website, you will see a little red 1 on the corner of Linkedin logo. Later, if you go to website, clear notification, and then open the same email, you will see that notification counter is gone. If find it quite interesting that Gmail lets this behaviour.


>gmail let's this behaviour

I'm assuming the server is just responding with a different image depending on a query param embedded in the image url? (an old technique), what should google do? any remote image url could respond with a new image in an old email it's just rare that it happens.


It used to prefetch external images [1]. Another option would be asking whether to download external images. I think one can enable this in settings, default is always display external images.

[1] https://arstechnica.com/information-technology/2013/12/gmail... [2] https://news.ycombinator.com/item?id=6896378


Yeah I always have all images disabled by default and turn them on on a per email basis if it's absolutely necessary. 90% of emails don't need them or just contain tracking pixels.


The image is dynamically generated at request time, so there isn't much Gmail can do, aside from eagerly preloading all images as soon as the email comes in.


As far as I remember, Gmail used to prefetch images to prevent senders learning if and when recepient opens an email, but if this behaviour changed, I didn't know that.


All Gmail does (or ever did) is proxy the image file so the server hosting it cannot do reverse IP lookup to collect client metadata like geolocation. The server hosting the image sees a Google IP address request the image, not (for example) your phone’s IP address.

But the image request still happens at the time you open the email. Google does not prefetch the images in unopened emails.

And if the image URL is personalized, it can still be correlated with your email address by the sender to record an open. Google does not try to guess which part of the URL they can dump without breaking the image.


> I'd love to hear what exact scenarios it does actually make sense to use Kafka for instead of Rabbit or AMQP1.0 :)

If order of message processing matters, then Kafka is better suited then AMQP. For example, In a distributed application for money transfers, if AMQP used, message order will be lost and some problems will occur in the following scenario:

User A with an accound of $1000 makes order for two transfers T1 ($600) and T2 ($500)

  - Rabbit delivers T1 to server1, before processing message, server1 enters a full GC.
  - Rabbit delivers T2 to server2 and server2 processes message immediately, now User A's account have $500  
  - Server1 resumes its life after the end of GC, but fails to process T1 since account's balance is less than required amount.
However, it is T2 that should have failed because User A ordered T1 first and T2 after.

In Kafka, when user account identifier is used for partitioning key, all User A's messages will be processed by same consumer (i.e server1), so even if server1 enters a full GC, that is OK, since T2 will be processed after T1.


FWIW, AMQP1.0 does support Sessions which can be used to address this scenario :)


> Almost all features of Instagram, except for interactive widgets in stories, are available from the web (doesn’t matter mobile or desktop).

Not exactly. When viewed in desktop browser, photo upload is not avaiable and you need to use developer tools to simulate mobile web browser view which is a workaround. Also, even in mobile web, you cannot upload more than one photo, even though this functionality exists in the app. These are very fundamental features of instagram, I think these are not so complex to implement in web versions.


I stand corrected. I forgot I don’t upload anything there lately and am just using it to catch up with people.


> I'm not sure how easy it is to figure out whether those 'highly forwarded messages' are all the same, or somehow link them without knowing anything about their content or linking them to information you already know about people.

They use a counter. I don't know, however, if it is enforced on only client side or it is in a unencrypted metadata which can be checked on server side.

> Forwarded messages contain a counter that keeps track of how many times a message is forwarded. [1]

[1] https://faq.whatsapp.com/general/chats/about-forwarding-limi...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: