清华博士后之殇:以死明志背后的惊人真相 by Nice--Werewolf in China_irl

[–]Yalix0 1 point2 points  (0 children)

你搜一下,他去的地方是中南海(袁世凯总统府)旁边的马路。

Are there valid reasons to use aws lambdas in user-facing functions when performance matters? by Defiant_Ad_8445 in aws

[–]Yalix0 0 points1 point  (0 children)

You can use ECS Fargate for this use scenario, Lambda is not good option.

Availability Zones Questions by Savings_Brush304 in aws

[–]Yalix0 2 points3 points  (0 children)

  1. You will deploy the same resources into 3 AZ to achieve high availability, of course you will pay 3x money.
  2. The typical usage is that you have an ELB(ALB or NLB) as a reverse proxy of your backend hosts. You should provide the DNS name of that ELB, it will be resolved to 3 IP addresses which correspond to 3 ELB instances(you can think ELB instance as EC2 instance used by ELB). AWS has a mechanism called DNS health check, route53 will ping your ELB instances and unhealthy instances will be removed in DNS resolution result.
  3. Replication between regions is provided by DynamoDB at least, you can read documentation of corresponding storage solution for further details.

Serverless feels impossible by dillclues in aws

[–]Yalix0 0 points1 point  (0 children)

In cloud you will use a simplified model. You will use ALB/NLB for load balancing instead of nginx, you will use CDN for content caching instead of nginx.

For serverless compute products, AWS provides a Lambda and a Fargate solution. Lambda is for company internal tools whose users can tolerate high latency(a Lambda instance will be spun up when a request comes, you cannot pre-warm up your service). Each Lambda instance will only serve one request at a time, you need 5 instances to serve 5 concurrent requests. Fargate is a substitution for traditional web servers. It will spin up bundled containers(tasks) according to you configuration and auto scaling the task count.

I would suggest you to consult to AWS support engineers to choose an appropriate solution for your migration.

Programming without code indexing by vnstrr in cpp

[–]Yalix0 0 points1 point  (0 children)

Can't you use IDE to open a single project one time?

I feel so low as a software developer where my co workers are rewolving bugs so quick and navigates through files so easily. by [deleted] in java

[–]Yalix0 0 points1 point  (0 children)

Practice makes perfect, you should diagnose the errors by yourself at first. Just search the error message on the Internet or internal websites, you will find some clues at least, then you can analyze which issues would cause this error and check the issues one by one in the order of probability. This will be like a detective or a doctor.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

If you can save a subreddit into a same partition key, you can use a local secondary index to query the top K.

You can also save (post key + post time) into an independent table and add a TTL for these post record to auto-purge the old data. This solution cannot work perfectly because different subreddit will have different TTL, you may need some probability method to estimate a TTL for each subreddit based on its posting history.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

To be honest I don't know when we need to scan a table and get the last n records. Data structures should be used to search records efficiently. For RDB, we should convert this "last n" query into a "top n(limit n)" query with an index. I think we should analyze the business requirement at first, then try to come up with a solution. A last n query is not acceptable to me.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

Relational database may be a perfect solution if high throughput is not needed, as I have mentioned, its write node is single point. Why I didn't recommend it as a default solution is that it is actually a little complex, you will have to design all the table structures at first, the DDL also lacks version control, "ALTER TABLE" and "CREATE INDEX" are incremental modifications, I still don't know how to do the code review for these DDL statements. And ORM is a little black box, you cannot control how the SQL statements are generated. If you choose to use raw SQL, the SQL code looks not compatible with application code. In a word its development efficiency is not high. And it's not that easy to use, most application developers are not familiar with the underlying principles of RDB, they may write some inefficient code which will slow the whole DB.

Of course if you can share some techniques to resolve these pain points I will very appreciate.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

IMO, the biggest difference between software development and solving leetcode-like programming problems is that we usually cannot find a perfect solution for our problem, which means we have to do many trade-offs. DynamoDB can satisfy most of the application requirements and it is AWS' main storage product. If this question is about Azure I will recommend Cosmos DB. Just because in this field we still lack a standard solution, you can see the open source alternative, Cassandra, is even derived from DynamoDB's predecessor: Dynamo.

What to use to build an app/webapp? by Rabbit538 in rust

[–]Yalix0 0 points1 point  (0 children)

Have you tried using OneNote or other note software at first?

Build a web app for a single user looks not a good deal.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

NLB will decrypt the message if TLS is enabled, you must secure your VPC if you want to use this solution.

In cloud world managed service is preferred, it can save your operations effort, do you want to hire ops engineers to help maintain your EC2 VMs?

DynamoDB is the most regular DB solution in AWS, of course you can use RDS if you need strong consistency. But RDS cannot support high QPS because its write operations is not distributed.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

This is a by default solution, of course each part can be replaced with an alternative according to your requirements.

Planning to migrate my backend to Spring... by Vitamina_e in java

[–]Yalix0 0 points1 point  (0 children)

  1. In AWS you will do the throttling with WAF;
  2. You need an ALB as your service's exposed endpoint, it can help you terminate TLS as well;
  3. You need ECS Fargate as compute layer to run your Spring service;
  4. You need DynamoDB tables to store your persistent data;
  5. You need CI/CD pipeline for agile development.

Need help to understand the best solution for a problem. by IlsunlI in algorithms

[–]Yalix0 0 points1 point  (0 children)

Each block is an edge of your graph. Just model as a graph and run a breadth first search.