Tuesday, October 5, 2021

Facebook whistleblower Frances Haugen delivers opening statement

Oct. 5, 2021

Here is the link. 

Facebook whistleblower and former Facebook product manager Frances Haugen testifies before a Senate subcommittee about Facebook's handling of data of children and other users. For access to live and exclusive video from CNBC subscribe to CNBC PRO: https://cnb.cx/2NGeIvi Facebook whistleblower Frances Haugen told a Senate panel Tuesday that Congress must intervene to solve the “crisis” created by her former employer’s products. The former Facebook product manager for civic misinformation told lawmakers that Facebook consistently puts its own profits over users’ health and safety, which is largely a result of its algorithms’ design that steers users toward high-engagement posts that in some cases can be more harmful.

Though she stopped short of accusing top executives of intentionally creating harmful products, she said that ultimately CEO Mark Zuckerberg had to be responsible for the impact of his business. Haugen also said that Facebook’s algorithm could steer young users from something relatively innocuous such as healthy recipes to content promoting anorexia in a short period of time. She proposed a solution for Facebook to change its algorithms to stop focusing on delivering posts that create more engagement and instead create a chronological feed of posts for Facebook users. That, she said, would help Facebook deliver safer content.

Haugen, who unmasked herself Sunday as the source behind leaked documents at the core of a revealing Wall Street Journal series about Facebook, testified before the Senate Commerce subcommittee on consumer protection. Haugen told CBS’ “60 Minutes” in an interview aired this weekend that the problems she saw at Facebook were worse than anywhere else she’d worked, which includes Google, Yelp and Pinterest. She told the news program that she copied tens of thousands of pages of internal research that she took with her when she left Facebook in May. “I saw that Facebook repeatedly encountered conflicts between its own profits and our safety,” Haugen said in her written testimony. “Facebook consistently resolved those conflicts in favor of its own profits. The result has been a system that amplifies division, extremism and polarization — and undermining societies around the world.”

In her prepared remarks, Haugen said she believes she did the right thing in coming forward but is aware Facebook could use its immense resources to “destroy” her. “I came forward because I recognized a frightening truth: almost no one outside of Facebook knows what happens inside Facebook,” Haugen said in her written remarks. “The company’s leadership keeps vital information from the public, the U.S. government, its shareholders, and governments around the world.” Haugen said a turning point that convinced her of the need to bring information outside Facebook was when the company dissolved the civic integrity team after the 2020 U.S. election. Facebook said it would integrate those responsibilities into other parts of the company. But Haugen said that within six months of the reorganization, 75% of her “pod” of seven people who had mostly come from civic integrity left for other parts of the company or left entirely. “Six months after the reorganization, we had clearly lost faith that those changes were coming,” she said.

In a statement after the hearing concluded, a Facebook spokesperson attempted to cast doubt on Haugen’s credibility.

Frances Haugens

 因此在这种风头期间,脸书的总瘫痪与对于全球网络的灾难性影响,也重新让全球社会开始讨论起「拆割查克柏格数字帝国」的周边讨论。而此一争辩,也正好与24小时前震动美国社会的「脸书吹哨人事件」有关。


脸者吹哨人Frances Haugens在CBS时事节目「60分钟」 中揭发脸书双重标准。(美联社)

豪根揭发脸书「败德报告」

脸书吹哨人事件指的是Facebook的前项目经理法兰西斯.豪根,因为不满老东家在数字道德政策上的严重瑕疵与恶意破坏,而在今年初离职后,将数份关键的「内部调查报告」外流给华尔街日报,并从9月起刊出一连串重量级爆料的〈脸书报告门〉。豪根所揭发的脸书「内部败德报告」,主要拆分成四大指控:

(1)脸书为了扩张流量影响力而秘密创建「社群阶级」,高知名用户、大型政治用户、高声量用户可以不受社群规则的交叉核实限制。这种鉴于「声量阶级」而非「事实性评断」的差别待遇,是造成全球性社群内战与「谣言系意见领袖」崛起的关键原因。

(2)脸书的持股人与创办人查克柏格存在严重分裂,甚至因剑桥分析丑闻的美国政府和解禁问题对簿公堂,股东认为查克柏格把脸书当成私产,并用公司资源来保护自己不受法律制裁。

(3)脸书的内部研究发现「Instagram会对青少女族群带来特别严重的身心压力」,相关因素包括网络性骚扰、匿名霸凌与外貌羞辱等,负面身心回馈比例高达32%——但对此,脸书的作法是「压制这份研究的曝光」,并完全不采取任何改善行动。

(4)在「公义之前Facebook选择『无限赚钱』」,虽然获利是公司的天职,但Facebook偏执的盈利导向却在言论审查、网络暴力、用户隐私、儿少身心健康、社会冲突与假新闻之间造成全球性严重伤害——虽然脸书总是声称会做事实查核与不当言论管理,「可是只要选举结束,风头一过,Facebook就会把这些『防火墙机制』秘密关闭——将公司获利成长至于整体安全之前,这就像是对民主社会的背叛。

脸书瘫痪的破坏程度,已严重阻碍了全球网络的数字服务运作。(欧新社)

豪根的爆料在华尔街日报刊出后,引发了国际舆论的热烈讨论,而他本人也在10月3日的CBS专访节目中以「真人现身」的方式亮相。尽管对于豪根的控诉,脸书总部已发出严重的谴责与驳斥不实声明,但豪根原本就将于10月5日出席的参议院社群问题听证会,此时再配上脸书大崩溃的全球冲击,「大到不能倒」的社群时代争辩,料也将因此风波而更为升级。

Tuesday, October 5, 2021 Oct. 4, 2021 Facebook outage | Chinese article

 全球网民依赖的社群平台脸书与相关平台Instagram及WhatsApp,4日上午突然当机,近6小时后才恢复正常。(路透)


「Faceook的我们正试着全力排除这场『不明故障』,抱歉...via Twitter。」全球社群龙头Facebook(脸书)集团自美东时间4日早上11时39分起,传出极为严重的「全集团瘫痪」——包括Facebook、脸书 Messenger、Instagram、Whatsapp与脸书投资的VR系统Oculus,瞬间于全球互联网大断线。

相关障害一直到晚上6时左右才排除。但Facebook全家族无预警下线的6个半小时内,却严重阻断了全球30亿用户的日常通信,甚至直接阻断了其他网络业者的帐号服务。故障期间,Facebook的全球市值一口气蒸发200到250亿美元,恐是脸书系列集体下线最久、瘫痪损害规模最大的「严重故障事件」。

集团内部 抢修应变都失灵

根据华尔街日报所取得的脸书集团内部通知信,截至4日中午为止,Facebook总公司都无法向员工说明瘫痪原因与公司到底发生了什么事,集团内部的抢修、紧急应变与客户通知系统也完全失灵,仅强调就已知资讯而言「本回故障并不似『恶意事件』」。其他外部专家与观察组织则认为,Facebook所遭遇的可能是域名系统(DNS)的内部设置故障,造成全球互联网与脸书集团服务的IP「彻底断线」。

Facebook的大断线,同时也让Twitter、Telegram、甚至是中国的Tiktok,见猎心喜地大开嘲讽并趁势抢进服务。但这起耗时超过6小时的「无端总崩溃」,却也可能加剧欧美政坛对于脸书创办人查克柏格(Mark Zuckerberg)的「社群帝国」疑虑——特别是在脸书总崩的24小时前,近一个月在华尔街日报揭发〈脸书报告〉的前脸书员工吹哨人豪根(Frances Haugen)才公开现身,全力控诉脸书集团在查克柏格治下已经「明知有恶而硬要为之」,对全球政治、社会包容、用户身心健康极具风险与威胁的方式自顾获利。

安全、道德、垄断都遭质疑

由于豪根本人即将于美东时间5日,参加美国国会参议院针对Facebook管制问题的重要听证会,关键交锋前夕的「脸书全球大崩溃」,也重新引发了世界各地对于脸书「大到不能倒」的安全、道德与过度垄断之质疑?

全球网民依赖的社群平台脸书与相关平台Instagram及WhatsApp,4日上午突然当机, 脸书用户重批脸书,在Twitter上极尽挖苦之能事。(取材自脸书)

金融时报表示:在查克柏格帝国「全球下线」的6小时内,脸书总部一直无法有效厘清、或对公众更新「障害排除进度」。但瘫痪的破坏程度,却已严重阻碍了全球网络的数字服务运作,因为除了Facebook、Instagram的「一般社群功能」失效外,数十亿个「连动Facebook帐号登录」的其他网络帐号(包括其他App、游戏、媒体订阅、电商服务...)也都一并无法使用。

社群平台脸书与相关平台Instagram及WhatsApp,4日上午突然当机。(欧新社)

再加上流行于世界各地的即时通信软件WhatsApp,也已由脸书集团持有,一起爆炸的状况也让超过20亿通信用户「与日常失联」——因此,脸书集团的总崩溃不仅是单纯「社群下线」,以全球规模损害并影响的社群广告、电子商务、数字帐号、甚至日常通信,都造成了极大而罕有的震荡冲击。

事实上,在过去Facebook集团就是常出现「集体性故障」的问题,不过受影响的区域大多有限,比较少出现「整个单一集团总崩盘」,并在完全不清楚也不通知的状况下,以「全球范围」总故障竟持续6小时以上的长时间。

「这真的很扯。」

Kentik网络分析主任马多利(Doug Madory)就对华盛顿邮报的访问如此表示:「Facebook的所有服务完全爆掉了。」

华尔街日报报导,Facebook的总崩溃受害范围遍及「脸书集团的所有持有服务」。在一封被《华尔街日报》取得的员工内部信里,脸书总公司更是直接表示:「我们不知道发生了什么事,目前工程抢修团队正紧急前往加州机房总部试图『物理还原』。

全球网民依赖的社群平台脸书与相关平台Instagram及WhatsApp,4日上午突然当机,近6小时后才恢复正常。(路透)

抢修进度 尴尬用推特发布

相关障害,一直持续到晚上6时才突然「逐步恢复」。但在这一过程中,脸书集团的所有公开道歉信与抢修进度说明,却得尴尬地使用「社群竞媒」Twitter来对外发布,脸书Messegenger的Twitter帐号甚至尴尬地试着以冷笑话回应呛声的用户:

「水星逆行的威力真的很强呢!」

但对此,大多数的商业用户与网络观察者却都笑不出来。因为脸书的无预警总崩,不仅在短短6小时内,对自家集团带来200亿美元以上的损失,通信的大乱还从脸书本体扩张到「所有链接Facebook帐号的网络服务」;与此同时,虽然Twitter、Telegram等社群软件不受影响,但从Facebook瘫痪而「瞬间外流」的数十亿用户流量,却也短暂造成了各路跨国网站的不稳与震荡,甚至从中加剧了部分谣言所煽动的「网战总开战恐慌」。

脸书集团史上最大的总瘫痪,在国际舆论上也重新燃起「查克柏格帝国是否大到不能倒?」的政策激辩——此一讨论不仅只限于欧洲的数字反垄断政策 ,在美国政坛也因为川普被停权禁言、以及1月6日国会山庄遇袭事件,而正在各种针对Facebook的听证会车轮战。

全球网民依赖的社群平台脸书与相关平台Instagram及WhatsApp,4日上午突然当机,近6小时后才恢复正常。(路透)





Oct. 4, 2021 Facebook outage | Chinese article

 当地时间 4 日,美国互联网巨头脸书公司的多款社交软件,在全球多个国家出现中断,甚至瘫痪,持续了近 7 个小时。据法新社报道,这是脸书公司成立以来最严重的一次宕机故障。

据报道,此次宕机故障涉及脸书旗下的四大社交产品,包括脸书平台、即时通讯软件移动聊天服务 Messenger、WhatsApp,以及图片社交服务 Instagram。随后,随后谷歌、亚马逊等网站也出现大面积宕机情况。近 7 个小时后,脸书表示系统已恢复运行。

截至目前,此次服务器大规模宕机的确切原因尚不清楚。脸书网页上显示服务中断是由于域名系统错误。有业内人士表示,没有证据表明这次系统中断是一次网络攻击,最有可能的解释是脸书在维护过程中错误地关闭了网络。

安克诺斯数据保护公司副总裁 斯特:由于某种原因,脸书的域名系统服务器似乎从互联网上消失了,无法经路由中转,通过域名进行访问,糟糕的是,故障也影响到脸书的技术人员,现在可能必须去现场进行修复。

《纽约时报》一名叫弗兰克尔的记者 4 日在推特上表示,脸书员工无法进入公司大楼评估社交网络运行故障,因为他们的工牌无法打开门锁。脸书创始人马克 · 扎克伯格当天也因宕机故障公开致歉。

受此影响,脸书股价 4 日暴跌近 5%,创近一年以来最大单日跌幅,6 百亿多美元,约合人民币 4000 多亿元的市值瞬间蒸发。



EQT stock: Gas industry

 作为原油的替代能源之一的天然气,最近也有不错的上涨行情。上周我们已经深度分析过EQT能源,代号EQT, 是美国最大的天然气生产商,市值77亿美元。昨天大盘全线暴跌情况下,逆势大涨4%。

它的信用状况在同行中也是最好的,这使它能够获得低成本债务,并进一步降低成本。这些因素使EQT能够产生可观的自由现金流。预计到2026年,EQT累计自由现金流将超过70亿美元。与此同时,如果价格上涨,它还有上行潜力。EQT预计近期将使用部分自由现金流偿还债务。到2026年,只有27亿美元的债务到期,该公司将有充足的多余现金用于其他股东友好的活动,如股息、股票回购和增值收购。

我们刚刚说到原油大佬们已经赚的盆满钵满了,但另一边的天然气空头们则是面临着爆仓风险。随着全球天然气期货价格暴涨,全球最大的大宗商品交易商嘉能可(Glencore)、贡沃尔(Gunvor)、托克(Trafigura)和维托尔(Vitol)等在欧美天然气市场的头寸都面临巨额追加保证金要求。

多年来,欧洲(红色)和美国(绿色)天然气的价格一直在一个明确的范围内交易。当两者之间的价差达到一个或另一个极端时,你买一个,卖另一个——很简单,对吧?


因此,随着欧洲天然气价格在第二季度飙升,相对于美国天然气价格达到了一个显著的极端,促使交易员采取出售欧洲天然气、购买美国天然气的策略,希望息差能缩小。


然而,上个月,由于库存低、亚洲天然气需求高、俄罗斯和液化天然气供应不足、供应中断等多种因素,欧洲天然气价格大幅上涨,这一战略出现了事与愿违的结果。


尤其对中小型交易公司来说,情况更为困难。消息人士称,追加保证金的规模是前所未有的,贸易公司和其他玩家一起已经积累了300亿美元的空头头寸。


历史上,天然气板块每次都当作投机题材来炒作,因为紧缺和涨价没有持续性,天然气板块每年都是冬天炒一波,然后结束。但这一次,天然气淡季不淡,以往冬季才上涨的,七月份就开始了大涨行情。所以预期价格上涨的持续性和幅度均会大超预期。

另外,今年欧洲也遭遇了“灾难性”的天然气危机,挪威、俄罗斯的天然气供应减少,但页岩开采热潮却使得美国变成了世界主要天然气出口国。今年美国出口海外的天然气较同期增加了近50%,这也间接导致了本土天然气供应紧张。


还有,新产能建设周期长。目前新投产的液化天然气产能通常是2016年前后立项建设的。上游炼化厂的建设周期较长,从决定投资到完全建成通常需要4-5年。供需错配+下游景气带来的产品涨价,以及政策支持,是天然气市场最硬核的上涨逻辑。


欧洲和亚洲的天然气基准价格相当于190美元/桶的原油价格,是当前布油价格的一倍多。


从需求方面看,根据美国能源信息署的数据,大约一半的美国家庭使用天然气来取暖和取暖。如果冬天大家供暖需求攀升,将会进一步推高天然气价格。它的价格在过去12个月飙升了 180% 以上,达到每百万英热单位 5.9 美元。这也是自从2014年2月以来,天然气价格最高的水平。所以大家也要做好心理准备:今年冬天,暖气费可能飙升,钱包又要缩水了.....


OPIS能源公司创始人 Tom Kloza提醒,今年秋天和冬天,大家要为家庭供暖成本的冲击做好准备。“如果你的暖气费去年是150美元,今年可能是300美元,史上“最贵”的冬天要来了。”



Facebook engineering: Storage | Needle in a haystack: efficient storage of billions of photos

Here is the article. 

POSTED ON  TO CORE DATA 

The Photos application is one of Facebook’s most popular features. Up to date, users have uploaded over 15 billion photos which makes Facebook the biggest photo sharing website. For each uploaded photo, Facebook generates and stores four images of different sizes, which translates to a total of 60 billion images and 1.5PB of storage. The current growth rate is 220 million new photos per week, which translates to 25TB of additional storage consumed weekly. At the peak there are 550,000 images served per second. These numbers pose a significant challenge for the Facebook photo storage infrastructure.

NFS photo infrastructure

The old photo infrastructure consisted of several tiers:

  • Upload tier receives users’ photo uploads, scales the original images and saves them on the NFS storage tier.
  • Photo serving tier receives HTTP requests for photo images and serves them from the NFS storage tier.
  • NFS storage tier built on top of commercial storage appliances.

Since each image is stored in its own file, there is an enormous amount of metadata generated on the storage tier due to the namespace directories and file inodes. The amount of metadata far exceeds the caching abilities of the NFS storage tier, resulting in multiple I/O operations per photo upload or read request. The whole photo serving infrastructure is bottlenecked on the high metadata overhead of the NFS storage tier, which is one of the reasons why Facebook relies heavily on CDNs to serve photos. Two additional optimizations were deployed in order to mitigate this problem to some degree:

  • Cachr: a caching server tier caching smaller Facebook “profile” images.
  • NFS file handle cache – deployed on the photo serving tier eliminates some of the NFS storage tier metadata overhead

Haystack Photo Infrastructure

The new photo infrastructure merges the photo serving tier and storage tier into one physical tier. It implements a HTTP based photo server which stores photos in a generic object store called Haystack. The main requirement for the new tier was to eliminate any unnecessary metadata overhead for photo read operations, so that each read I/O operation was only reading actual photo data (instead of filesystem metadata). Haystack can be broken down into these functional layers:

  • HTTP server
  • Photo Store
  • Haystack Object Store
  • Filesystem
  • Storage

In the following sections we look closely at each of the functional layers from the bottom up.

Storage

Haystack is deployed on top of commodity storage blades. The typical hardware configuration of a 2U storage blade is:

  • 2 x quad-core CPUs
  • 16GB – 32GB memory
  • hardware raid controller with 256MB – 512MB of NVRAM cache
  • 12+ 1TB SATA drives

Each storage blade provides around 10TB of usable space, configured as a RAID-6 partition managed by the hardware RAID controller. RAID-6 provides adequate redundancy and excellent read performance while keeping the storage cost down. The poor write performance is partially mitigated by the RAID controller NVRAM write-back cache. Since the reads are mostly random, the NVRAM cache is fully reserved for writes. The disk caches are disabled in order to guarantee data consistency in the event of a crash or a power loss.

Filesystem

Haystack object stores are implemented on top of files stored in a single filesystem created on top of the 10TB volume. Photo read requests result in read() system calls at known offsets in these files, but in order to execute the reads, the filesystem must first locate the data on the actual physical volume. Each file in the filesystem is represented by a structure called an inode which contains a block map that maps the logical file offset to the physical block offset on the physical volume. For large files, the block map can be quite large depending on the type of the filesystem in use. Block based filesystems maintain mappings for each logical block, and for large files, this information will not typically fit into the cached inode and is stored in indirect address blocks instead, which must be traversed in order to read the data for a file. There can be several layers of indirection, so a single read could result in several I/Os depending on whether or not the indirect address blocks are cached. Extent based filesystems maintain mappings only for contiguous ranges of blocks (extents). A block map for a contiguous large file could consist of only one extent which would fit in the inode itself. However, if the file is severely fragmented and its blocks are not contiguous on the underlying volume, its block map can grow large as well. With extent based filesystems, fragmentation can be mitigated by aggressively allocating a large chunk of space whenever growing the physical file. Currently, the filesystem of choice is XFS, an extent based filesystem providing efficient file preallocation.

Haystack Object Store

Haystack is a simple log structured (append-only) object store containing needles representing the stored objects. A Haystack consists of two files – the actual haystack store file containing the needles, plus an index file. The following figure shows the layout of the haystack store file:

My notes:

  1. a haystack consists of two files - the actual haystack store file containing the needles, plus an index file

The first 8KB of the haystack store is occupied by the superblock. Immediately following the superblock are needles, with each needle consisting of a header, the data, and a footer:

A needle is uniquely identified by its <Offset, Key, Alternate Key, Cookie> tuple, where the offset is the needle offset in the haystack store. Haystack doesn’t put any restriction on the values of the keys, and there can be needles with duplicate keys. Following figure shows the layout of the index file:

There is a corresponding index record for each needle in the haystack store file, and the order of the needle index records must match the order of the associated needles in the haystack store file. The index file provides the minimal metadata required to locate a particular needle in the haystack store file. Loading and organizing index records into a data structure for efficient lookup is the responsibility of the Haystack application (Photo Store in our case). The index file is not critical, as it can be rebuilt from the haystack store file if required. The main purpose of the index is to allow quick loading of the needle metadata into memory without traversing the larger Haystack store file, since the index is usually less than 1% the size of the store file.

Haystack Write Operation

A Haystack write operation synchronously appends new needles to the haystack store file. After the needles are committed to the larger Haystack store file, the corresponding index records are then written to the index file. Since the index file is not critical, the index records are written asynchronously for faster performance. The index file is also periodically flushed to the underlying storage to limit the extent of the recovery operations caused by hardware failures. In the case of a crash or a sudden power loss, the haystack recovery process discards any partial needles in the store and truncates the haystack store file to the last valid needle. Next, it writes missing index records for any trailing orphan needles at the end of the haystack store file. Haystack doesn’t allow overwrite of an existing needle offset, so if a needle’s data needs to be modified, a new version of it must be written using the same <Key, Alternate Key, Cookie> tuple. Applications can then assume that among the needles with duplicate keys, the one with the largest offset is the most recent one.

Haystack Read Operation

The parameters passed to the haystack read operation include the needle offset, key, alternate key, cookie and the data size. Haystack then adds the header and footer lengths to the data size and reads the whole needle from the file. The read operation succeeds only if the key, alternate key and cookie match the ones passed as arguments, if the data passes checksum validation, and if the needle has not been previously deleted (see below).

Haystack Delete Operation

The delete operation is simple – it marks the needle in the haystack store as deleted by setting a “deleted” bit in the flags field of the needle. However, the associated index record is not modified in any way so an application could end up referencing a deleted needle. A read operation for such a needle will see the “deleted” flag and fail the operation with an appropriate error. The space of a deleted needle is not reclaimed in any way. The only way to reclaim space from deleted needles is to compact the haystack (see below).

Photo Store Server

Photo Store Server is responsible for accepting HTTP requests and translating them to the corresponding Haystack store operations. In order to minimize the number of I/Os required to retrieve photos, the server keeps an in-memory index of all photo offsets in the haystack store file. At startup, the server reads the haystack index file and populates the in-memory index. With hundreds of millions of photos per node (and the number will only grow with larger capacity drives), we need to make sure that the index will fit into the available memory. This is achieved by keeping a minimal amount of metadata in memory, just the information required to locate the images. When a user uploads a photo, it is assigned a unique 64-bit id. The photo is then scaled down to 4 different sizes. Each scaled image has the same random cookie and 64-bit key, and the logical image size (large, medium, small, thumbnail) is stored in the alternate key. The upload server then calls the photo store server to store all four images in the Haystack. The in-memory index keeps the following information for each photo:Haystack uses the open source Google sparse hash data structure to keep the in-memory index small, since it only has 2 bits of overhead per entry.

Photo Store Write/Modify Operation

A write operation writes photos to the haystack and updates the in-memory index with the new entries. If the index already contains records with the same keys then this is a modification of existing photos and only the index records offsets are modified to reflect the location of the new images in the haystack store file. Photo store always assumes that if there are duplicate images (images with the same key) it is the one stored at a larger offset which is valid.

Photo Store Read Operation

The parameters passed to a read operation include haystack id and a photo key, size and cookie. The server performs a lookup in the in-memory index based on the photo key and retrieves the offset of the needle containing the requested image. If found it calls the haystack read operation to get the image. As noted above haystack delete operation doesn’t update the haystack index file record. Therefore a freshly populated in-memory index can contain stale entries for the previously deleted photos. Read of a previously deleted photo will fail and the in-memory index is updated to reflect that by setting the offset of the particular image to zero.

Photo Store Delete Operation

After calling the haystack delete operation the in-memory index is updated by setting the image offset to zero signifying that the particular image has been deleted.

Compaction

Compaction is an online operation which reclaims the space used by the deleted and duplicate needles (needles with the same key). It creates a new haystack by copying needles while skipping any duplicate or deleted entries. Once done it swaps the files and in-memory structures.

HTTP Server

The HTTP framework we use is the simple evhttp server provided with the open source libevent library. We use multiple threads, with each thread being able to serve a single HTTP request at a time. Because our workload is mostly I/O bound, the performance of the HTTP server is not critical.

Summary

Haystack presents a generic HTTP-based object store containing needles that map to stored opaque objects. Storing photos as needles in the haystack eliminates the metadata overhead by aggregating hundreds of thousands of images in a single haystack store file. This keeps the metadata overhead very small and allows us to store each needle’s location in the store file in an in-memory index. This allows retrieval of an image’s data in a minimal number of I/O operations, eliminating all unnecessary metadata overhead.

Peter Vajgel, Doug Beaver and Jason Sobel are infrastructure engineers at Facebook.

Crude oil price: Go up to $100 from $80 per barrel

 美国银行在最新研报中称,如果今年冬季寒冷,而且随着全球航空公司为美国重新开放边境做准备,全球能源危机可能有助于推动油价自2014年以来首次突破每桶100美元后会引发全球经济危机,柴油价格则可能会突破每桶120美元。并给出了3点原因:

  1. 天然气价格飙升令人们转向原油作为取暖燃料,从天然气转到原油的替代量可能达到100万至200万桶/日。

  2. 冬季寒冷可能对原油需求构成50万桶/日的提振。

  3. 航空交通的增加可能在2022年第一季度增加油需30万至50万桶/日。


与美国银行一样,鼓吹“超级周期即将到来”的大宗商品旗手高盛也高调看好油价涨势。称结构性需求将取代周期性因素支撑油价继续走高,布伦特原油自2018年10月以来首次涨破80美元之后,这种涨势会继续下去,预计今年年底布油升至90美元/桶。


在原油库存方面,高盛表示在疫情期间积累的高原油库存正以450万桶/天的创纪录速度快速消耗。相关的消耗量已经超过OPEC+短期内能够增产的能力,而美国页岩油的复产还在初始阶段。这为全球原油库存在年底前降至2013年以来的最低水平奠定了基础。


产能不足则会加剧油价飙升。美国页岩气田最大的运营商——先锋自然资源公司的首席执行官Scott Sheffield表示:美国原油生产商无法增加供应,以遏制仍在“OPEC+控制下”的原油价格飙升。


维托尔亚洲主管Mike Muller表示。在美国,“如果你需要额外的原油,那么钻机数量根本无法满足产量的需求。”


周末,美国南加州外海海底的油管发生了漏油事件。Amplify Energy昨天暴跌44%,该公司管道破裂导致12.6万加仑的原油泄漏到海洋中。


More details about the October 4 outage | 20 minutes reading time

 POSTED ON  TO NETWORKING & TRAFFIC

By 

Now that our platforms are up and running as usual after yesterday’s outage, I thought it would be worth sharing a little more detail on what happened and why — and most importantly, how we’re learning from it. 

This outage was triggered by the system that manages our global backbone network capacity. The backbone is the network Facebook has built to connect all our computing facilities together, which consists of tens of thousands of miles of fiber-optic cables crossing the globe and linking all our data centers.

Those data centers come in different forms. Some are massive buildings that house millions of machines that store data and run the heavy computational loads that keep our platforms running, and others are smaller facilities that connect our backbone network to the broader internet and the people using our platforms. 

When you open one of our apps and load up your feed or messages, the app’s request for data travels from your device to the nearest facility, which then communicates directly over our backbone network to a larger data center. That’s where the information needed by your app gets retrieved and processed, and sent back over the network to your phone.

The data traffic between all these computing facilities is managed by routers, which figure out where to send all the incoming and outgoing data. And in the extensive day-to-day work of maintaining this infrastructure, our engineers often need to take part of the backbone offline for maintenance — perhaps repairing a fiber line, adding more capacity, or updating the software on the router itself.

This was the source of yesterday’s outage. During one of these routine maintenance jobs, a command was issued with the intention to assess the availability of global backbone capacity, which unintentionally took down all the connections in our backbone network, effectively disconnecting Facebook data centers globally. Our systems are designed to audit commands like these to prevent mistakes like this, but a bug in that audit tool prevented it from properly stopping the command. 

This change caused a complete disconnection of our server connections between our data centers and the internet. And that total loss of connection caused a second issue that made things worse.  

One of the jobs performed by our smaller facilities is to respond to DNS queries. DNS is the address book of the internet, enabling the simple web names we type into browsers to be translated into specific server IP addresses. Those translation queries are answered by our authoritative name servers that occupy well known IP addresses themselves, which in turn are advertised to the rest of the internet via another protocol called the border gateway protocol (BGP). 

To ensure reliable operation, our DNS servers disable those BGP advertisements if they themselves can not speak to our data centers, since this is an indication of an unhealthy network connection. In the recent outage the entire backbone was removed from operation,  making these locations declare themselves unhealthy and withdraw those BGP advertisements. The end result was that our DNS servers became unreachable even though they were still operational. This made it impossible for the rest of the internet to find our servers. 

All of this happened very fast. And as our engineers worked to figure out what was happening and why, they faced two large obstacles: first, it was not possible to access our data centers through our normal means because their networks were down, and second, the total loss of DNS broke many of the internal tools we’d normally use to investigate and resolve outages like this. 

Our primary and out-of-band network access was down, so we sent engineers onsite to the data centers to have them debug the issue and restart the systems. But this took time, because these facilities are designed with high levels of physical and system security in mind. They’re hard to get into, and once you’re inside, the hardware and routers are designed to be difficult to modify even when you have physical access to them. So it took extra time to activate the secure access protocols needed to get people onsite and able to work on the servers. Only then could we confirm the issue and bring our backbone back online. 

Once our backbone network connectivity was restored across our data center regions, everything came back up with it. But the problem was not over — we knew that flipping our services back on all at once could potentially cause a new round of crashes due to a surge in traffic. Individual data centers were reporting dips in power usage in the range of tens of megawatts, and suddenly reversing such a dip in power consumption could put everything from electrical systems to caches at risk.   

Helpfully, this is an event we’re well prepared for thanks to the “storm” drills we’ve been running for a long time now. In a storm exercise, we simulate a major system failure by taking a service, data center, or entire region offline, stress testing all the infrastructure and software involved. Experience from these drills gave us the confidence and experience to bring things back online and carefully manage the increasing loads. In the end, our services came back up relatively quickly without any further systemwide failures. And while we’ve never previously run a storm that simulated our global backbone being taken offline, we’ll certainly be looking for ways to simulate events like this moving forward.  

Every failure like this is an opportunity to learn and get better, and there’s plenty for us to learn from this one. After every issue, small and large, we do an extensive review process to understand how we can make our systems more resilient. That process is already underway.  

We’ve done extensive work hardening our systems to prevent unauthorized access, and it was interesting to see how that hardening slowed us down as we tried to recover from an outage caused not by malicious activity, but an error of our own making. I believe a tradeoff like this is worth it — greatly increased day-to-day security vs. a slower recovery from a hopefully rare event like this. From here on out, our job is to strengthen our testing, drills, and overall resilience to make sure events like this happen as rarely as possible.


The Storage Technologies Behind Facebook Messages

Oct. 5, 2021

Here is the link. 


Consistency Models | HBase definitive guide book reading

Oct. 5, 2021

I like to take some notes:

Consistency models:

  1. Strict
  2. Sequential
  3. Causal
  4. Eventual
  5. Weak

Consistency Models

It seems fitting to talk about consistency a bit more since it is mentioned often throughout this book. On the outset, consistency is about guaranteeing that a database always appears truthful to its clients. Every operation on the database must carry its state from one consistent state to the next. How this is achieved or implemented is not specified explicitly so that a system has multiple choices. In the end, it has to get to the next consistent state, or return to the previous consistent state, to fulfill its obligation.

Consistency can be classified in, for example, decreasing order of its properties, or guarantees offered to clients. Here is an informal list:

Strict

The changes to the data are atomic and appear to take effect instantaneously. This is the highest form of consistency.

Sequential

Every client sees all changes in the same order they were applied.

Causal

All changes that are causally related are observed in the same order by all clients.

Eventual

When no updates occur for a period of time, eventually all updates will propagate through the system and all replicas will be consistent.

Weak

No guarantee is made that all updates will propagate and changes may appear out of order to various clients.

The class of system adhering to eventual consistency can be even further divided into subtler sets, where those sets can also coexist. Werner Vogels, CTO of Amazon, lists them in his post titled “Eventually Consistent”. The article also picks up on the topic of the CAP theorem,* which states that a distributed system can only achieve two out of the following three properties: consistency, availability, and partition tolerance. The CAP theorem is a highly discussed topic, and is certainly not the only way to classify, but it does point out that distributed systems are not easy to develop given certain requirements. Vogels, for example, mentions: An important observation is that in larger distributed scale systems, network  partitions are a given and as such consistency and availability cannot be achieved at the same time. This means that one has two choices on what to drop; relaxing consistency will allow the system to remain highly available [...] and prioritizing consistency means that under certain conditions the system will not be available.

Relaxing consistency, while at the same time gaining availability, is a powerful proposition. However, it can force handling inconsistencies into the application layer and may increase complexity.

Medicine Ball Arm Workout | DietHealth

Oct. 5, 2021

Here is the link. 

With a 4- to 8-pound medicine ball, try this progressive arm workout. It starts off easy, but Lisa Johnson will show you how to steadily increase the difficulty. Your arms will be feeling this!! http://www.diet.com/videos/play/medic... Check out more from Lisa Johnson: http://www.lisajohnsonfitness.com Subscribe to our YouTube channel http://www.youtube.com/subscription_c... Tweet us http://www.twitter.com/DietHealth Facebook http://www.facebook.com/Dietcom Pinterest http://www.pinterest.com/Dietcom Sign up for our Free Weekly Newsletter! http://bit.ly/Diet-Newsletter Join Diet.com for free: http://bit.ly/JoinDiet Browse Sample Meal and Exercise Plans: http://www.diet.com/diet-plan/

Monday, October 4, 2021

Case study: GTE, RIG, BORR stocks | GTE stock Aug 19 0.45/ share -> Oct. 5, 0.94/ share, 100% gain

 Oct. 4, 2021



My purchase and sold detail 


Aug. 19, 2021 | GTE my position with over 30% loss | Purchased $15,000 RIG stock instead

Aug. 19 to Oct. 5, 100% return 


I have knowledge of GTE stock and analysis of capital market value learned from my research, what I need to work on is to have confidence, and learn how to hold on those positions.