Java e-Commerce project surface question (iv)

Source: Internet
Author: User
Tags zookeeper redis cluster

Dubbo Service development process, running process? What is the role of Zookeeper registration center?
Use process:
The first step: to use Dubbo in the system should first build a registration center, generally recommended to use zookeeper.
Step two: With the registry and then the Publishing Service, the Publishing service needs to use the spring container and the Dubbo tag to publish the service. And you need to specify the location of the registry when you publish the service.
The third step: After the service is released, the service is invoked. The generic invocation service also uses the spring container and the Dubbo tag to refer to the service so that it can generate a proxy object for a service in the client's container, invoking the service's method directly in the action or controller.
The role of the Zookeeper Registry is primarily the role of registration and discovery services. Similar to the role of real estate intermediary, in the system does not participate in the service calls and data transmission.
How does the E-commerce project address high concurrency and high availability?
1. Page static
2.fastDFS Image Server
3. Data Cache server
4. Database cluster, library table hashing (various optimizations of database, splitting of database)
5. Load Balancing
What is load balancing
When the amount of traffic in a single server is greater, the server becomes more stressed and the server crashes when it is larger than it is capable of withstanding. In order to avoid server crashes and give users a better experience, we share server pressure through load balancing.
We can build a lot of servers, a server cluster, when users visit the site, the first access to an intermediary server, the intermediary server in the server cluster to select a less stressful server, and then bring the access request to the server. In this way, each user's access to the server cluster will ensure that each server pressure to balance, sharing the server pressure, to avoid the situation of server crashes.
Load balancing is realized by the principle of reverse proxy.
Why can redis do cache? What is the purpose of using Redis in a project? When does Redis work?
1) Redis is a NoSQL database in the form of Key-value. You can quickly locate the key you are looking for and take the value out of it. And all of the Redis data is put into memory and accessed very quickly, and is generally used for caching.
2) The use of Redis in the project is generally used as a cache, the purpose of which is to reduce the pressure of the database to improve access efficiency.
3) Redis can be used as a cache in Internet projects as long as it involves high concurrency or if there is a large amount of read data. Of course, Redis provides a rich set of data types that, in addition to caching, can determine the role of Redis based on actual business scenarios. For example, use Redis to save the user's shopping cart information, generate order numbers, traffic counters, task queues, leaderboards, and so on.
Redis supports five types of data storage: 1. String 2. Hash 3. List 4. Collection 5. Ordered set
What about a node outage in a Redis cluster? Have you met? What is your idea of a solution?
Redis cluster: The general is at least 2 servers, master-slave server! If the Redis cluster's primary server is hung up, there is no connection and a standby server
The function, principle and characteristic of acitvemq? Producers Consumers. -Peer, subscription implementation process)
The role of ACTIVEMQ is to communicate between systems. Of course, you can use other methods for inter-system communication, if you use ACTIVEMQ, you can decouple the calls between systems to achieve asynchronous communication between systems. The principle is that producers produce messages and send messages to ACTIVEMQ. ACTIVEMQ receives the message, then looks at how many consumers there are and then forwards the message to the consumer, a process in which the producer does not need to participate. The consumer does not have any relationship with the producer after receiving the message and doing the corresponding processing.
When the technical interviewer asks you a bit more about your technology, you don't know what to say.
If you don't have a thorough study, you can answer without knowing it.
Features: 1. Support for Spring 2. Support for multiple transfer Protocols 3. Full support for the JMS specification

How is ACTIVEMQ applied in the project? ACTIVEMQ in the project is mainly to complete the communication between the system, and the system between the call decoupling. For example, after adding and modifying the product information, it is necessary to synchronize the product information to the index library, synchronize the data in the cache, and generate a series of static page actions. In this scenario, you can use the ACTIVEMQ. Once the product information is modified in the background, a message is sent to the ACTIVEMQ and then sent to the consumer of the message via ACTIVEMQ, and the consumer receives the message for the appropriate business processing.

Java e-Commerce project surface question (iv)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.