Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run microservices on Ignite

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article focuses on "how to run microservices on Ignite". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to run microservices on Ignite.

Running microservices on Ignite: part I

Starting with this article, we will use a series of pages to introduce the use of the Apache Ignite in-memory data organization platform to build fault-tolerant, scalable micro-service-based solutions.

Introduction

At present, many companies build their applications or solutions on micro-service architecture. the main advantage of this is that a solution can be divided into a set of loosely coupled software components (micro-services). These software components may have their own versions and lifecycles, or even their own development teams. In addition, these software may be developed and maintained in different languages and technologies. But because all microservices are part of larger artifacts (software or solutions), they need at least one mechanism to interact with each other and exchange data.

At the same time, microservice-based solutions will also be used in scenarios where there is a high load or need to deal with fast-growing data, so it will face the same problems and difficulties as applications and solutions that are not based on microservices.

Disk-oriented databases have been unable to keep up with the rapid growth of data, which need to be stored and processed in parallel, and the database is becoming the performance bottleneck of the whole application or solution.

The high availability guarantee of software as a good function has become a thing of the past. At present, the high availability of applications has become a de facto standard.

Starting with this article, we will provide a step-by-step introduction to building fault-tolerant, scalable micro-service-based solutions using the Apache Ignite in-memory data organization platform.

Micro-service-based solutions using Apache Ignite

The following figure describes the main components of the entire solution, and then delves into the roles that define them one by one.

Ignite cluster layer

A cluster has two functions:

First, as the primary data store, it holds the dataset directly in memory. Because the data is closer to CPU, a microservice does not need to fetch data from disk, which significantly improves overall performance. From the figure above, we have designated a specific cluster group (data node) to specifically deal with this problem.

A data node is an Ignite server node that holds part of the dataset and can perform queries and calculations. In addition, depending on the binary formatting technology based on object serialization, a data node does not need to deploy model objects and computing support classes, which is called peer-to-peer class loading mechanism. it can manage computing classes preloaded from application logical nodes (service nodes).

Second, the cluster manages the life cycle of the microservice and equips the microservice with all the necessary API, such as the API that communicates with other services or data nodes. To achieve this, an Ignite cluster-based solution needs to include the aforementioned service nodes, which are deployed with microservices, and the application logic is executed here. A service node can deploy one or more micro-services, depending on the specific application and load. Every micro-service needs to implement Ignite's Service interface, which directly has the ability to tolerate faults and access other micro-services.

Ignite handles the deployment of one or more copies of a microservice within the scope of the service node and automatically performs fault tolerance and load balancing. In figure 1 above, such microservices are named MS (MS1,MS2, etc.). The advantage of spreading the load between multiple services and data nodes is that if the MS1 micro-service changes, there is no need to restart the entire cluster, all you need to do is to update the relevant classes of MS1 on the service nodes where MS1 micro-services are deployed, so only a subset of all nodes needs to be restarted.

All nodes (service and data nodes) are interconnected, which enables MS1 deployed on one service node to communicate with microservices deployed on any other or its own service node, and to obtain and send data and calculations to any data node.

Persistent storage layer

This layer is optional and can be used in the following scenarios:

It is not necessary or feasible to hold all the data in memory

The ability to recover datasets from disk-based replicas is required, and the entire cluster needs to be down or restarted.

To enable the persistent storage layer, simply provide an Ignite data cache that implements the CacheStore interface. Among the default supported implementations are RDBMS,MongoDB and Cassandra.

External application layer

This is the "user" of the micro-service architecture application, which is basically a level that triggers various execution processes that invoke a micro-service.

This layer can communicate with microservices using external protocols specific to each microservice (while internally, microservices can communicate with each other using Ignite services, or using Ignite client connections), with great flexibility and a variety of options.

At this point, I believe you have a deeper understanding of "how to run microservices on Ignite". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report