Apache Kafka is distributed Publisher-Subscriber messaging system.
What does Publisher-Subscriber do?
Publisher publishes some information and subscriber subscribes those messages.
What is Messaging System?
Apache Kafka main purpose to store the messages sent by publisher and supply those message to subscribe whenever they request those messages.
Kafka Overview
Producer / Publisher
In Apache Kafka, publishers are referred to as Producers. They play a crucial role in sending messages to Subscribers (also known as Consumers). Producers are responsible for producing and sending messages to Kafka topics, which are then stored in the brokers and consumed by subscribers.
Consumer/ Subscriber
Subscribers are called consumers as they consume messages from Kafka Brokers
Broker
They store messages and they serve publishers and subscribers.And the Kafka broker simply stores messages in files on a hard drive, and producers are able to append messages to those files, and consumers are able to read from those files.
Zookeeper
Zookeeper manages the configuration of topics and partitions in a Kafka cluster. When a topic is created, Zookeeper:
Stores the topic configuration
Distributes the configuration to all brokers in the cluster
In summary, Zookeeper is essential in the Kafka ecosystem as it maintains and coordinates the configuration of topics and partitions across the cluster.
Kafka Topic and Partition
Kafka Topic : Messages sent by publishers to brokers are stored in a special entity called a topic.
Key Points bout Kafka Topics
Unique Name: Each topic has its own unique name.
Cluster-Wide Uniqueness: The topic name must be unique across the entire Kafka cluster.
Offset Number: Each message within a topic is assigned a specific number called an offset.
Offset Assignment: The offset number is assigned to each message when it arrives at a specific broker.
Append-Only: Producers can only append messages to the end of the log, not insert them in the middle or at the beginning.
These points highlight the organization and structure of topics in Kafka, ensuring efficient and scalable data processing.
Using Active Directory Federation Services (ADFS), external users or other domain users can seamlessly access authorized resources across multiple environments with a single authentication. By establishing a trust relationship, or federation, between the two environments, users can leverage their local logon credentials to access resources in their own environment and then access external resources in another environment without needing to re-authenticate
Key Differences Proxy servers act as intermediaries between clients and servers, but their direction of service determines whether they are forward or reverse proxies.
Forward Proxy:
A Forward Proxy is a type of proxy server that sits between a client and a server, acting as an intermediary for requests from the client to the server. It’s called a “forward” proxy because it forwards requests from the client to the server.
Key Characteristics:
Client-initiated: The client initiates a request to the Forward Proxy, which then forwards it to the server.
Server-agnostic: The client doesn’t know the details of the server; it only knows the Forward Proxy’s address.
Request forwarding: The Forward Proxy forwards the client’s request to the server, and then returns the server’s response to the client.
Anonymity: The client’s IP address is hidden from the server, as the request appears to come from the Forward Proxy’s IP address.
Caching: Forward Proxies can cache frequently accessed resources, reducing the load on the server and improving response times.
Here are some product examples of Forward Proxies:
Squid: A popular open-source Forward Proxy caching server for web traffic.
Apache HTTP Server with mod_proxy: A widely used web server that can be configured as a Forward Proxy.
NGINX: A web server and reverse proxy server that can also function as a Forward Proxy.
HAProxy: A high-performance load balancer and Forward Proxy server.
F5 BIG-IP: A comprehensive application delivery controller (ADC) that includes Forward Proxy capabilities.
Cisco Web Security Appliance (WSA): A security-focused Forward Proxy for web traffic.
Blue Coat ProxySG: A secure web gateway that functions as a Forward Proxy.
IBM DataPower Gateway: A purpose-built appliance that includes Forward Proxy capabilities (as mentioned earlier).
Microsoft Forefront TMG (Threat Management Gateway): A discontinued but still used Forward Proxy server.
Pulse Secure: A secure access solution that includes Forward Proxy capabilities.
Glabal Protect (Prisma): A secure access solution that includes Forward Proxy capabilities.
These products can be used in various scenarios, such as:
Content filtering and caching
Load balancing and application delivery
Security and threat protection
Access control and authentication
Web acceleration and optimization
Note that some of these products may offer additional features beyond Forward Proxy capabilities.
Web Proxy vs SOCKS Proxy:
Key Differences Both web proxies and SOCKS proxies act as intermediaries between clients and servers, but they differ in their protocol support, functionality, and use cases.
Web Proxy:
HTTP/HTTPS protocol support only: designed specifically for web traffic Understands web requests: can interpret and modify HTTP headers, cookies, and content Caching and content filtering: can cache frequently requested resources and filter out unwanted content Typical use cases: anonymous browsing, content filtering, caching, and accessing geo-restricted websites.
SOCKS Proxy:
SOCKS proxy servers redirect traffic through them before passing it on to the intended destination. This is achieved by first establishing a TCP connection with the proxy server through the SOCKS protocol. Data can then be sent from your computer to the proxy server, which then relays it to the recipient
Multi-protocol support: handles various protocols like HTTP, HTTPS, FTP, SMTP, and more Does not interpret traffic: simply forwards packets without modifying or caching content Better suited for non-web traffic: ideal for applications like email, FTP, and torrent clients Typical use cases: anonymous torrenting, accessing geo-restricted content, and bypassing firewalls
Reverse Proxy: Server-side proxy: sits between servers and the internet Hides server IP addresses: protects servers from direct access, improving security Load balancing: distributes incoming requests across multiple servers SSL termination: handles SSL encryption and decryption, reducing server load Caching and compression: improves performance and reduces bandwidth usage Typical use cases: server protection, load balancing, content delivery networks (CDNs)
Reverse Proxy:
A Reverse Proxy is a server that sits between a server and a client, acting as an intermediary for requests from the client to the server. It’s called a “reverse” proxy because it reverses the typical proxy flow, where the proxy sits between the client and the internet.
Key Characteristics:
Server-initiated: The server initiates the connection to the Reverse Proxy, which then forwards requests to the client.
Client-agnostic: The server doesn’t know the details of the client; it only knows the Reverse Proxy’s address.
Request forwarding: The Reverse Proxy forwards the client’s request to the server, and then returns the server’s response to the client.
Server protection: The Reverse Proxy hides the server’s IP address and protects it from direct client access.
Load balancing: Reverse Proxies can distribute client requests across multiple servers to improve responsiveness and availability.
Flow:
Client sends request to Reverse Proxy
Reverse Proxy forwards request to Server
Server processes request and sends response to Reverse Proxy
Reverse Proxy returns response to Client
Benefits:
Security: Protects server from direct client access and attacks
Scalability: Enables load balancing and server scaling
Flexibility: Allows for server maintenance and updates without affecting clients
Caching: Can cache frequently accessed resources to improve performance
SSL termination: Can handle SSL encryption and decryption, reducing server load
Common Use Cases:
Web servers: Protect and load balance web servers
API gateways: Manage and secure API traffic
Microservices: Enable communication between microservices and clients
Cloud services: Provide a single entry point for cloud-based services
DataPower as a Reverse Proxy:
IBM DataPower can be configured as a Reverse Proxy to provide advanced security, scalability, and performance features, such as:
Security: Authentication, authorization, and encryption
Load balancing: Distribute client requests across multiple servers
Caching: Cache frequently accessed resources
SSL termination: Handle SSL encryption and decryption
Content routing: Route requests based on content type or URL
By using DataPower as a Reverse Proxy, organizations can protect their servers, improve scalability and performance, and provide a secure and flexible infrastructure for their applications.
APIs are software intermediaries that allow different applications to communicate with each other. APIs provide a set of protocols, routines, and tools for building software applications. They specify how software components should interact, making it easier for developers to create applications that can integrate with other systems.
The architecture of an API (Application Programming Interface) is typically described as a client-server model. The client is the application that initiates the request and the server is the application that responds to the request. For example, weather app, the server would be the bureau’s weather database which provides the requested data, and the client would be the mobile app which sends the request for weather information. This model helps to ensure that the communication between the client and server is consistent and efficient. Additionally, it allows for greater flexibility in terms of how the client and server interact with one another, as well as how they are designed and implemented. Overall, the client-server model is a fundamental concept in API architecture and is essential for creating effective and reliable APIs.
There are four different ways that APIs
SOAP APIs
APIs use Simple Object Access Protocol (SOAP) and that the client and server exchange messages using XML. SOAP is a protocol for exchanging structured information in the implementation of web services. XML is a markup language used for encoding documents in a format that is both human-readable and machine-readable. SOAP is a less flexible API that was more popular in the past, suggesting that newer APIs may offer more flexibility.
RPC APIs
APIs that allow a client to complete a function or procedure on a server is Remote Procedure Calls. This means that the client sends a request to the server to execute a specific function or procedure, and the server processes the request and sends the output back to the client. This type of communication allows for distributed computing, where different parts of an application can be run on different servers. Remote Procedure Calls are commonly used in web development, where a client-side application needs to retrieve data from a server-side database or perform other server-side operations.
Websocket APIs
Web Service API refers to a software interface that enables communication between a web server and web browser. It allows different applications to interact with each other over the internet. It is important to note that all web services are APIs, but not all APIs are web services.
A REST API is a specific type of Web API that adheres to the standard architectural style explained above. REST stands for Representational State Transfer, and it is a set of guidelines for creating web services that are scalable, flexible, and easy to maintain. REST APIs use HTTP requests to get or send data and can be used with any programming language. They are widely used in modern web development and are considered a crucial component of many web applications.
REST APIs
REST APIs are popular and flexible tools used on the web. They work by the client sending requests to the server, which then uses this input to perform internal functions and send output data back to the client.
REST is short for Representational State Transfer and it defines functions such as GET, PUT, and DELETE that clients can use to access server data through HTTP. The key feature of REST API is statelessness, meaning that servers do not store client data between requests. Client requests are similar to URLs typed in a browser, and the server’s response is plain data without any graphical rendering.