As an BI/Analytics Engineer in the B2B SaaS industry, understanding and measuring key performance indicators (KPIs) is essential for assessing the success and growth of your business. In this article, we will explore the top 20 KPI metrics that every B2B SaaS company should consider. These metrics provide valuable insights into various aspects of your business, helping you make informed decisions and drive growth.
Monthly Recurring Revenue (MRR): MRR measures the predictable revenue generated by your SaaS product on a monthly basis. By monitoring MRR, you can gauge the stability and growth potential of your business.
Annual Run Rate (ARR): ARR projects the annualized revenue based on the current MRR. It offers a snapshot of your business’s revenue potential and aids in forecasting and strategic planning.
Customer Lifetime Value (CLTV): CLTV calculates the total revenue a customer is expected to generate over their lifetime as a customer. It helps you assess the long-term value of acquiring and retaining customers.
Customer Acquisition Cost (CAC): CAC measures the cost associated with acquiring a new customer. By tracking CAC, you can evaluate the efficiency of your marketing and sales efforts.
Churn Rate: Churn rate quantifies the percentage of customers who cancel or do not renew their subscriptions within a given period. Monitoring churn is crucial for understanding customer satisfaction and identifying areas for improvement.
Customer Retention Rate: The inverse of churn rate, customer retention rate calculates the percentage of customers who continue to subscribe to your service. High retention indicates customer satisfaction and loyalty.
Net Revenue Retention (NRR): NRR measures the revenue growth from existing customers, considering both expansion revenue (upsells, cross-sells) and churn. It helps identify opportunities for maximizing revenue from your current customer base.
Average Revenue Per User (ARPU): ARPU calculates the average revenue generated per user or customer. By analyzing ARPU, you can evaluate pricing strategies and assess revenue potential.
Gross Margin: Gross margin measures the profitability of your SaaS business. It calculates the revenue remaining after deducting the cost of goods sold (COGS).
Customer Satisfaction Score (CSAT): CSAT measures the level of customer satisfaction through surveys or feedback. It provides valuable insights into customer perception and helps you improve your product and service.
Net Promoter Score (NPS): NPS assesses customer loyalty and their likelihood to recommend your product to others. A high NPS indicates satisfied customers who are likely to become advocates for your brand.
Activation Rate: Activation rate measures the percentage of customers who successfully onboard and start actively using your product. It reflects the effectiveness of your onboarding process and the user experience.
Average Revenue Per Account (ARPA): ARPA calculates the average revenue generated per customer account. It helps you segment customers and understand revenue distribution.
Cost of Goods Sold (COGS): COGS represents the direct costs associated with delivering your SaaS product, such as infrastructure, hosting, and third-party service costs. Monitoring COGS helps you evaluate and optimize your cost structure.
Average Contract Value (ACV): ACV calculates the average value of contracts signed with new customers. It provides insights into deal sizes and revenue potential.
Sales Conversion Rate: Sales conversion rate measures the percentage of leads or trials that convert into paying customers. Monitoring this metric helps you assess the effectiveness of your sales process and identify areas for improvement.
Time to Value (TTV): TTV measures the time it takes for customers to realize the value of your product after onboarding. By optimizing TTV, you can enhance the onboarding experience and drive customer success.
Upsell/Cross-sell Revenue: This metric measures the additional revenue generated from existing customers through upselling or cross-selling products or features. It presents opportunities to increase revenue from your current customer base.
Customer Support Response Time: Response time measures how quickly your customer support team responds to customer queries or issues. Providing timely and efficient support is crucial for customer satisfaction and retention.
Active Usage/Engagement: Active usage or engagement measures how frequently customers use your SaaS product and interact with its features. It indicates customer adoption and satisfaction. Tracking active usage helps you identify opportunities for improving product stickiness.
Conclusion: Measuring the right KPI metrics is vital for monitoring the health and growth of your B2B SaaS business. By leveraging these top 20 KPI metrics, you can gain valuable insights into customer acquisition, retention, revenue generation, and overall customer satisfaction. Use these metrics as a guide to make data-driven decisions and optimize your strategies to drive long-term success in the competitive B2B SaaS market.
Once you are logged into your Ubuntu 16.04 instance, run the following command to update your base system with the latest available packages.
apt-get update -y
apt-get upgrade
reboot
Next, create a new user account for Hadoop. You can do this by running the following command:
adduser hadoop (and existing password)
Next, you will also need to set up SSH key-based authentication. First, login to Hadoop user with the following command:
su – hadoop
2 – Getting Started Hadoop is written in Java, so you will need to install Java to your server. You can install it by just running the following command:
apt-get install default-jdk -y
Once Java is installed, verify the version of the Java using the following command:
For a project I was reading some benchmarks at GitHub and google, I found an article then I was surprised, its too much interesting result for me, you can check the result below.
> docker run hello-world
docker : Unable to find image 'hello-world:latest' locally
...
latest:
Pulling from library/hello-world
ca4f61b1923c:
Pulling fs layer
ca4f61b1923c:
Download complete
ca4f61b1923c:
Pull complete
Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
...
5 – List the hello-worldimage that was downloaded from Docker Hub:
> docker image ls
6 – Explore the Docker help pages by running some help commands:
> docker --help
> docker container --help
> docker container ls --help
> docker run --help
Sample Complex Applications
In this section, demonstrated sample the ease and power of Dockerized applications by running something more complex, such as an OS and a webserver.
Pull an image of the Ubuntu OS and run an interactive terminal inside the spawned container: > docker run --interactive --tty ubuntu bash
docker run --interactive --tty ubuntu bash
docker : Unable to find image 'ubuntu:latest' locally
...
latest:
Pulling from library/ubuntu
22dc81ace0ea:
Pulling fs layer
1a8b3c87dba3:
Pulling fs layer
91390a1c435a:
Pulling fs layer
...
Digest: sha256:e348fbbea0e0a0e73ab0370de151e7800684445c509d46195aef73e090a49bd6
Status: Downloaded newer image for ubuntu:latest
You are in the container. At the root # prompt, check the hostname of the container:
root@8aea0acb7423:/# hostname
8aea0acb7423
Notice that the hostname is assigned as the container ID (and is also used in the prompt).
Exit the shell with the exit command (which also stops the container):
List containers with the --all option (because no containers are running).
The hello-world container (randomly named, relaxed_sammet) stopped after displaying its message. The ubuntu container (randomly named, laughing_kowalevski) stopped when you exited the container.
docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8aea0acb7423 ubuntu "bash" 2 minutes ago Exited (0) 2 minutes ago laughing_kowalevski
45f77eb48e78 hello-world "/hello" 3 minutes ago Exited (0) 3 minutes ago relaxed_sammet
Pull and run a Dockerized nginx web server that we name, webserver:
docker run --detach --publish 80:80 --name webserver nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
716f7a5f3082: Pull complete
7b10f03a0309: Pull complete
Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff12debeb7a092730d638c33e0de3e
Status: Downloaded newer image for nginx:latest
dfe13c68b3b86f01951af617df02be4897184cbf7a8b4d5caf1c3c5bd3fc267f
Point your web browser at http://localhost to display the nginx start page. (You don’t need to append :80 because you specified the default HTTP port in the docker command.)
List only your running containers:
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0e788d8e4dfd nginx "nginx -g 'daemon of…" 2 minutes ago Up 2 minutes 0.0.0.0:80->80/tcp webserver
Stop the running nginx container by the name we assigned it, webserver:
> docker container stop webserver
Remove all three containers by their names — the latter two names will differ for you:
As a developer working with SQL Server there was a need to import data from the database to Elasticsearch and analyze data in Kibana.
As Elasticsearch is an open-source project built with Java and handles most other open-source projects, documentation on importing data from SQL Server to ES using LogStash.
I’d like to share how to import SQL Server data to Elasticsearch (version 6.2) using LS and verify the result on Kibana.
Assumption
I will skip on installing ELK (ElasticSearch, LogStash, and Kibana) stack as it’s outside the scope of this article. Please refer to installation steps on Elastic download pages.
Here are the steps required to import SQL Server data to Elasticsearch.
Install Java Development Kit (JDK)
Install JDBC Driver for SQL Server
Set CLASSPATH for the driver
Create an Elasticsearch Index to Import Data to
Configure LogStash configuration file
Run LogStash
Verify in Kibana
Step 1 – Install Java SE Development Kit 8
One of the gotchas is that you might install the latest version of JDK, which is version 9 but Elasticsearch documentation requires you to install JDK 8.
At the time of writing, the latest JDK 8 version is 8u162, which can be downloaded here.
Download “JDK8 8u162” and install it on your machine and make sure that “java” is in the PATH variable so that it can be called in any directory within a command line.
As Elasticsearch is built with JDK 8, you can’t use the latest version of JDBC Driver (version 6.2) for SQL Server as it does not support JDK 8.
Step 3 – Set CLASSPATH for the JDBC Driver
We need to set the path so that Java can find the JDBC driver.
? Note: I am working on Windows 10 machine.
1. Go to the directory under which you have installed SQL Server JDBC.
2. Now you need to navigate to find a JAR file named sqljdbc42.jar, which is found under<<JDBC installation folder>>\sqljdbc_4.2\enu\jre8
3. And then copy the full path to the JAR file.
A cool trick on Windows 7/8/10 is that, when shift+right click on a file, it gives you a “Copy as Path” option.
4. Go to Windows Start button and type “environment” and click on “Edit the system environment variables”.
5. Add a CLASSPATH environment variable with following values (if you don’t already have one).
“.” – for the current directory to search.
And the JAR file path copied in previously (e.g. “C:\talih\Java\MicrosoftJDBCDriversSQLServer\sqljdbc_4.2\enu\jre8\sqljdbc42.jar”).
Gotcha: If you have a space in the path for JDBC JAR file, make sure to put double quotes around it.
Not doing so will result in either of following error messages when you start LogStash service in later step.
c:\talih\elasticco\logstash-6.2.2>bin\logstash -f sql.conf
Error: Could not find or load main class JDBC
- Or -
c:\talih\elasticco\logstash-6.2.2>bin\logstash -f sql.conf
Error: Could not find or load main class File\Microsoft
Let’s now move onto to create an Elasticsearch index to import data to.
Step 4 – Create an Elasticsearch Index to Import Data to
You can use cURL or Postman to create an Index but I will use Kibana console to create an index named “cs_users”, which is equivalent to a database in relational database terminology.
Before we start the Kibana service, we need to start Elasticsearch so that Kibana would not whine about Elasticsearch not being present.
Kibana warnings on lines 12~21 due to Elasticsearch being unavailable
Go to the Elasticsearch installation and start the service.
on the left panel of the Kibana Dev Tools Console.
Create a new Elasticsearch index named “cs_users”
I won’t go into details on “shards” and “replicas” since it’s outside the scope of this article. For more information on the syntax, refer to the official Elasticsearch documentation.
And you will see the response from Elasticsearch with index creation confirmation on the panel right.
A new index “cs_users” is created on Elasticsearch successfully
OK, now we are finally ready to move onto creating a configuration file for LogStash to actually import data.
Step 5 – Configure LogStash configuration file
Go to the LogStash installation folder and create a file named “sql.conf” (name doesn’t really matter). Here is the LogStash configuration I will be using.
Elasticsearch will connect to the server named “cc” running on port 1433 to connect to a database named “StackExchangeCS” with integrated security authentication method.
jdbc_driver_class – This is the driver class contained within the JDBC JAR file. The JDBC JAR file contains a driver of type “com.microsoft.sqlserver.jdbc.SQLServerDriver” according to the documentation.
If you have an inquisitive mind, you can confirm it by opening the JAR file with your choice of ZIP program as JAR is a simple ZIP file.
Unzip JAR to verify JDBC driver name
jdbc_user – If you are using “Integrated Security” as an authentication option, this can be any string (I just entered “xxx” since that’s the easiest thing I can type ?).
SQL Server data (all cs.stackexchange.com users) will be sent to Elasticsearch running on the local machine port 9200 and will be indexed under “cs_users” index created in “Step 4 – Create an Elasticsearch Index to Import Data to”. There are quite a bit of Elasticsearch configuration options so please refer to the official LogStash documentation for more “elasticsearch” output plugin options.
Step 6 – Import Data with LogStash
With prerequisites out of the way, we are now ready to import data to Elasticsearch from SQL Server. Go to the LogStash installation location under which you should have created “sql.conf” and run LogStash service.
bin\logstash -f sql.conf
-f flag specifies the configuration file to use. In our case, “sql.conf” we created in the previous step.
The result of successful LogStash run will look similar to the following output.
Step 7 – Verify in Kibana
Wow, we have finally imported data. Now let’s do a quick check whether the number of records in the database matches the records in Elasticsearch.
Verifying result of data import
“User” table in the SQL Server has 59394 records and Elasticsearch returns the same number as well. ? Note: You can use following command to get the list of all records in “cs_users” index.
Elasticsearch can be downloaded directly from elastic.co in zip, tar.gz, deb, or rpm packages. For Ubuntu, it’s best to use the deb (Debian) package which will install everything you need to run Elasticsearch.
First, update your package index.
sudo apt-get update
Download the latest Elasticsearch version, which is 2.3.1 at the time of writing.
Then install it in the usual Ubuntu way with dpkg.
sudo dpkg -i elasticsearch-2.3.1.deb
This results in Elasticsearch being installed in /usr/share/elasticsearch/ with its configuration files placed in /etc/elasticsearch and its init script added in /etc/init.d/elasticsearch.
To make sure Elasticsearch starts and stops automatically with the server, add its init script to the default runlevels.
sudo systemctl enable elasticsearch.service
Before starting Elasticsearch for the first time, please check the next section about the recommended minimum configuration.
Step 2 — Configuring Elasticsearch
Now that Elasticsearch and its Java dependencies have been installed, it is time to configure Elasticsearch. The Elasticsearch configuration files are in the /etc/elasticsearch directory. There are two files:
elasticsearch.yml configures the Elasticsearch server settings. This is where all options, except those for logging, are stored, which is why we are mostly interested in this file.
logging.yml provides configuration for logging. In the beginning, you don’t have to edit this file. You can leave all default logging options. You can find the resulting logs in /var/log/elasticsearch by default.
The first variables to customize on any Elasticsearch server are node.name and cluster.name in elasticsearch.yml. As their names suggest, node.name specifies the name of the server (node) and the cluster to which the latter is associated.
If you don’t customize these variable, a node.name will be assigned automatically in respect to the Droplet hostname. The cluster.name will be automatically set to the name of the default cluster.
The cluster.name value is used by the auto-discovery feature of Elasticsearch to automatically discover and associate Elasticsearch nodes to a cluster. Thus, if you don’t change the default value, you might have unwanted nodes, found on the same network, in your cluster.
To start editing the main elasticsearch.yml configuration file with nano or your favorite text editor.
sudo nano /etc/elasticsearch/elasticsearch.yml
Remove the # character at the beginning of the lines for cluster.name and node.name to uncomment them, and then update their values. Your first configuration changes in the /etc/elasticsearch/elasticsearch.yml file should look like this:
/etc/elasticsearch/elasticsearch.yml
. . .
cluster.name: mycluster1
node.name: "My First Node"
. . .
These the minimum settings you can start with using Elasticsearch. However, it’s recommended to continue reading the configuration part for more thorough understanding and fine-tuning of Elasticsearch.
One especially important setting of Elasticsearch is the role of the server, which is either master or slave. Master servers are responsible for the cluster health and stability. In large deployments with a lot of cluster nodes, it’s recommended to have more than one dedicated master. Typically, a dedicated master will not store data or create indexes. Thus, there should be no chance of being overloaded, by which the cluster health could be endangered.
Slave servers are used as workhorses which can be loaded with data tasks. Even if a slave node is overloaded, the cluster health shouldn’t be affected seriously, provided there are other nodes to take additional load.
The setting which determines the role of the server is called node.master. By default, a node is a master. If you have only one Elasticsearch node, you should leave this option to the default true value because at least one master is always needed. Alternatively, if you wish to configure the node as a slave, assign a false value to the variable node.master like this:/etc/elasticsearch/elasticsearch.yml
. . .
node.master: false
. . .
Another important configuration option is node.data, which determines whether a node will store data or not. In most cases this option should be left to its default value (true), but there are two cases in which you might wish not to store data on a node. One is when the node is a dedicated master” as previously mentioned. The other is when a node is used only for fetching data from nodes and aggregating results. In the latter case the node will act up as a search load balancer.
Again, if you have only one Elasticsearch node, you should not change this value. Otherwise, to disable storing data locally, specify node.data as false like this:/etc/elasticsearch/elasticsearch.yml
. . .
node.data: false
. . .
In larger Elasticsearch deployments with many nodes, two other important options are index.number_of_shards and index.number_of_replicas. The first determines how many pieces, or shards, the index will be split into. The second defines the number of replicas which will be distributed across the cluster. Having more shards improves the indexing performance, while having more replicas makes searching faster.
By default, the number of shards is 5 and the number of replicas is 1. Assuming that you are still exploring and testing Elasticsearch on a single node, you can start with only one shard and no replicas. Thus, their values should be set like this:/etc/elasticsearch/elasticsearch.yml
One final setting which you might be interested in changing is path.data, which determines the path where data is stored. The default path is /var/lib/elasticsearch. In a production environment, it’s recommended that you use a dedicated partition and mount point for storing Elasticsearch data. In the best case, this dedicated partition will be a separate storage media which will provide better performance and data isolation. You can specify a different path.data path by specifying it like this:/etc/elasticsearch/elasticsearch.yml
. . .
path.data: /media/different_media
. . .
Once you make all the changes, save and exit the file. Now you can start Elasticsearch for the first time.
sudo systemctl start elasticsearch
Give Elasticsearch a few to fully start before you try to use it. Otherwise, you may get errors about not being able to connect.
Step 3 — Securing Elasticsearch
By default, Elasticsearch has no built-in security and can be controlled by anyone who can access the HTTP API. This is not always a security risk because Elasticsearch listens only on the loopback interface (i.e., 127.0.0.1) which can be accessed only locally. Thus, no public access is possible and your Elasticsearch is secure enough as long as all server users are trusted or this is a dedicated Elasticsearch server.
Still, if you wish to harden the security, the first thing to do is to enable authentication. Authentication is provided by the commercial Shield plugin. Unfortunately, this plugin is not free but there is a free 30 day trial you can use to test it. Its official page has excellent installation and configuration instructions. The only thing you may need to know in addition is that the path to the Elasticsearch plugin installation manager is /usr/share/elasticsearch/bin/plugin.
If you don’t want to use the commercial plugin but you still have to allow remote access to the HTTP API, you can at least limit the network exposure with Ubuntu’s default firewall, UFW (Uncomplicated Firewall). By default, UFW is installed but not enabled. If you decide to use it, follow these steps:
First, create a rule to allow any needed services. You will need at least SSH allowed so that you can log in the server. To allow world-wide access to SSH, whitelist port 22.
sudo ufw allow 22
Then allow access to the default Elasticsearch HTTP API port (TCP 9200) for the trusted remote host, e.g.TRUSTED_IP, like this:
sudo ufw allow from TRUSTED_IP to any port 9200
Only after that enable UFW with the command:
sudo ufw enable
Finally, check the status of UFW with the following command:
sudo ufw status
If you have specified the rules correctly, the output should look like this:
Output of java -versionStatus: active
To Action From
-- ------ ----
9200 ALLOW TRUSTED_IP
22 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
Once you have confirmed UFW is enabled and protecting Elasticsearch port 9200, then you can allow Elasticsearch to listen for external connections. To do this, open the elasticsearch.yml configuration file again.
sudo nano /etc/elasticsearch/elasticsearch.yml
Find the line that contains network.bind_host, uncomment it by removing the # character at the beginning of the line, and change the value to 0.0.0.0 so it looks like this:/etc/elasticsearch/elasticsearch.yml
. . .
network.host: 0.0.0.0
. . .
We have specified 0.0.0.0 so that Elasticsearch listens on all interfaces and bound IPs. If you want it to listen only on a specific interface, you can specify its IP in place of 0.0.0.0.
To make the above setting take effect, restart Elasticsearch with the command:
sudo systemctl restart elasticsearch
After that try to connect from the trusted host to Elasticsearch. If you cannot connect, make sure that the UFW is working and the network.host variable has been correctly specified.
Step 4 — Testing Elasticsearch
By now, Elasticsearch should be running on port 9200. You can test it with curl, the command line client-side URL transfers tool and a simple GET request.
curl -X GET 'http://localhost:9200'
You should see the following response:
Output of curl{
"name" : "My First Node",
"cluster_name" : "mycluster1",
"version" : {
"number" : "2.3.1",
"build_hash" : "bd980929010aef404e7cb0843e61d0665269fc39",
"build_timestamp" : "2016-04-04T12:25:05Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}
If you see a response similar to the one above, Elasticsearch is working properly. If not, make sure that you have followed correctly the installation instructions and you have allowed some time for Elasticsearch to fully start.
To perform a more thorough check of Elasticsearch execute the following command:
curl -XGET 'http://localhost:9200/_nodes?pretty'
In the output from the above command you can see and verify all the current settings for the node, cluster, application paths, modules, etc.
Step 5 — Using Elasticsearch
To start using Elasticsearch, let’s add some data first. As already mentioned, Elasticsearch uses a RESTful API, which responds to the usual CRUD commands: create, read, update, and delete. For working with it, we’ll use again curl.
You can add your first entry with the command:
curl -X POST 'http://localhost:9200/tutorial/helloworld/1' -d '{ "message": "Hello World!" }'
In the above example we have modified the message of the first entry to “Hello People!”. With that, the version number has been automatically increased to 2.
You may have noticed the extra argument pretty in the above request. It enables human readable format so that you can write each data field on a new row. You can also “prettify” your results when retrieving data and get much nicer output like this:
curl -X GET 'http://localhost:9200/tutorial/helloworld/1?pretty'
So far we have added to and queried data in Elasticsearch. To learn about the other operations please check the API documentation.
Last Step – Get Data from SQL to Elastich With Nifi
Conclusion
That’s how easy it is to install, configure, and begin using Elasticsearch. Once you have played enough with manual queries, your next task will be to start using it from your applications.
1 – Verify the JDK installation on your machine. Open the shell/terminal and type java -version and javac -version.
2 – Download Scala Binaries from http://www.scala-lang.org/download/. As of writing this post Scala version is 2.11.6, so you should be getting downloaded file as scala-2.11.6.tgz. Unzip the scala-2.11.6.tgz file using the following command as shown below.
3 – tar -xvzf scala-2.11.6.tgz
4 – After unzipping, change the path to point to the directory using cd command as shown below.
5 – For instance my directory is Downloads in which Scala binaries are unzipped.
6 – Now we are in the downloads directory where Scala binaries are present. Just go to the bin directory.
7 – cd scala-2.11.6 / cd bin
8 – This is the Scala REPL shell in which we can type programs and see the outcome right in the shell.
Scala Hello World Example
class Student() {
var id:Int = 0
var age:Int = 0
def studentDetails(i:Int,a:Int) {
id = i
age = a
println(“Student Id is :”+id);
println(“Student Age is :”+age);
}
}
Output: defined class Student
Here we create a Student class and print the student details in the studentDetails method by passing student id and age as parameter. If there are no errors in the code then a message “defined class Student” is displayed.
Create the student object and invoke the studdetails method by passing the student id and age.
object Stud {
def main(args:Array[String]) {
val stu = new Student();
stu.studentDetails(10,8);
}
}
At the highest level, a Pulsar instance is composed of one or more Pulsar clusters. Clusters within an instance can replicate data amongst themselves.
The diagram below provides an illustration of a Pulsar cluster:
Pulsar Comparison With Apache Kafka
The table below lists the similarities and differences between Apache Pulsar and Apache Kafka:
KAFKA
PULSAR
Concepts
Producer-topic-consumer group-consumer
Producer-topic-subscription-consumer
Consumption
More focused on streaming, exclusive messaging on partitions. No shared consumption.
Unified messaging model and API.
Streaming via exclusive, failover subscription
Queuing via shared subscription
Acking
Simple offset management
Prior to Kafka 0.8, offsets are stored in ZooKeeper
After Kafka 0.8, offsets are stored on offset topics
Unified messaging model and API.
Streaming via exclusive, failover subscription
Queuing via shared subscription
Retention
Messages are deleted based on retention. If a consumer doesn’t read messages before the retention period, it will lose data.
Messages are only deleted after all subscriptions consumed them. No data loss even the consumers of a subscription are down for a long time.Messages are allowed to keep for a configured retention period time even after all subscriptions consume them.
TTL
No TTL support
Supports message TTL
Conclusion
Apache Pulsar is an effort undergoing incubation at The Apache Software Foundation (ASF) sponsored by the Apache Incubator PMC. It seems that it will be a competitive alternative to Apache Kafka due to its unique features.